Update user.py

This commit is contained in:
Mr Chen
2024-11-01 18:59:08 +08:00
parent 0467d39c90
commit a4cdc1e03b
+1 -3
View File
@@ -73,10 +73,8 @@ def setUserByRoot(
if name is not None:
data['name'] = name
if name is not None:
if password is not None:
data['password'] = mw.md5(password)
print(data)
Users.query.filter(Users.id==1).update(data)
db.session.commit()