1
0
Fork 0

fix: Use better conditional judgment methods

Alpha
吴宇涵 2023-03-21 12:45:57 +08:00
parent 48de496caa
commit 44db2218c1
1 changed files with 1 additions and 1 deletions

View File

@ -116,5 +116,5 @@ def get_users():
def update_user_password(username, password="123456"):
with db_session:
user = User.select(name=username)
if user and user.first():
if user:
user.first().password = md5(username + password)