Update user.py

This commit is contained in:
Mr Chen 2024-11-01 19:00:21 +08:00
parent a4cdc1e03b
commit 205bb47101
1 changed files with 3 additions and 0 deletions

View File

@ -75,6 +75,9 @@ def setUserByRoot(
if password is not None:
data['password'] = mw.md5(password)
if not data:
return False
Users.query.filter(Users.id==1).update(data)
db.session.commit()