Skip to content

Commit 205bb47

Browse files
committed
Update user.py
1 parent a4cdc1e commit 205bb47

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

web/admin/model/user.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ def setUserByRoot(
7575

7676
if password is not None:
7777
data['password'] = mw.md5(password)
78+
79+
if not data:
80+
return False
7881

7982
Users.query.filter(Users.id==1).update(data)
8083
db.session.commit()

0 commit comments

Comments
 (0)