浏览代码

Merge pull request #3699 from Peter-De-Ath/fix-update-user-email-auth

fix auth update_email_by_id - add db.commit
Timothy Jaeryang Baek 10 月之前
父节点
当前提交
a7fb560e84
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      backend/apps/webui/models/auths.py

+ 2 - 0
backend/apps/webui/models/auths.py

@@ -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