Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
ebcc5be1
Commit
ebcc5be1
authored
Jul 10, 2024
by
Timothy J. Baek
Browse files
fix: db
parent
2aa5d267
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
backend/apps/webui/models/auths.py
backend/apps/webui/models/auths.py
+1
-1
backend/apps/webui/models/tags.py
backend/apps/webui/models/tags.py
+1
-1
No files found.
backend/apps/webui/models/auths.py
View file @
ebcc5be1
...
@@ -159,7 +159,7 @@ class AuthsTable:
...
@@ -159,7 +159,7 @@ class AuthsTable:
log
.
info
(
f
"authenticate_user_by_trusted_header:
{
email
}
"
)
log
.
info
(
f
"authenticate_user_by_trusted_header:
{
email
}
"
)
try
:
try
:
with
get_db
()
as
db
:
with
get_db
()
as
db
:
auth
=
db
.
query
(
Auth
).
filter
(
email
=
email
,
active
=
True
).
first
()
auth
=
db
.
query
(
Auth
).
filter
_by
(
email
=
email
,
active
=
True
).
first
()
if
auth
:
if
auth
:
user
=
Users
.
get_user_by_id
(
auth
.
id
)
user
=
Users
.
get_user_by_id
(
auth
.
id
)
return
user
return
user
...
...
backend/apps/webui/models/tags.py
View file @
ebcc5be1
...
@@ -100,7 +100,7 @@ class TagTable:
...
@@ -100,7 +100,7 @@ class TagTable:
)
->
Optional
[
TagModel
]:
)
->
Optional
[
TagModel
]:
try
:
try
:
with
get_db
()
as
db
:
with
get_db
()
as
db
:
tag
=
db
.
query
(
Tag
).
filter
(
name
=
name
,
user_id
=
user_id
).
first
()
tag
=
db
.
query
(
Tag
).
filter
_by
(
name
=
name
,
user_id
=
user_id
).
first
()
return
TagModel
.
model_validate
(
tag
)
return
TagModel
.
model_validate
(
tag
)
except
Exception
as
e
:
except
Exception
as
e
:
return
None
return
None
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment