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
a7fb560e
Unverified
Commit
a7fb560e
authored
Jul 07, 2024
by
Timothy Jaeryang Baek
Committed by
GitHub
Jul 07, 2024
Browse files
Merge pull request #3699 from Peter-De-Ath/fix-update-user-email-auth
fix auth update_email_by_id - add db.commit
parents
d51e8665
1bb27242
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
backend/apps/webui/models/auths.py
backend/apps/webui/models/auths.py
+2
-0
No files found.
backend/apps/webui/models/auths.py
View file @
a7fb560e
...
...
@@ -173,6 +173,7 @@ class AuthsTable:
result
=
(
db
.
query
(
Auth
).
filter_by
(
id
=
id
).
update
({
"password"
:
new_password
})
)
db
.
commit
()
return
True
if
result
==
1
else
False
except
:
return
False
...
...
@@ -182,6 +183,7 @@ class AuthsTable:
with
get_db
()
as
db
:
result
=
db
.
query
(
Auth
).
filter_by
(
id
=
id
).
update
({
"email"
:
email
})
db
.
commit
()
return
True
if
result
==
1
else
False
except
:
return
False
...
...
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