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
776bb289
Commit
776bb289
authored
May 26, 2024
by
Jun Siang Cheah
Browse files
fix: bad user get
parent
7385016e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
backend/apps/webui/models/users.py
backend/apps/webui/models/users.py
+1
-1
No files found.
backend/apps/webui/models/users.py
View file @
776bb289
...
@@ -114,7 +114,7 @@ class UsersTable:
...
@@ -114,7 +114,7 @@ class UsersTable:
def
get_user_by_email
(
self
,
email
:
str
)
->
Optional
[
UserModel
]:
def
get_user_by_email
(
self
,
email
:
str
)
->
Optional
[
UserModel
]:
try
:
try
:
user
=
User
.
get
(
User
.
email
==
email
and
User
.
oauth_sub
.
is_null
())
user
=
User
.
get
(
(
User
.
email
==
email
,
User
.
oauth_sub
.
is_null
())
)
return
UserModel
(
**
model_to_dict
(
user
))
return
UserModel
(
**
model_to_dict
(
user
))
except
:
except
:
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