Only db commit on requests that change the database

This commit is contained in:
Jeremy Zhang
2018-06-15 00:13:09 +00:00
parent 4c41a31418
commit d540a4888b
5 changed files with 33 additions and 5 deletions

View File

@ -145,6 +145,7 @@ def update_user_status(guild_id, username, user_key=None):
if dbUser.username != username or dbUser.ip_address != ip_address:
dbUser.username = username
dbUser.ip_address = ip_address
db.session.commit()
else:
status = {
'authenticated': True,