mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2025-04-19 10:17:31 +00:00
Update api_key.py
I added the parentheses to the `db.session.rollback` line to call the method, which will now properly roll back any changes made to the database if an error occurs.
This commit is contained in:
parent
a7f55dec17
commit
2656242b45
@ -83,7 +83,7 @@ class ApiKey(db.Model):
|
||||
except Exception as e:
|
||||
msg_str = 'Update of apikey failed. Error: {0}'
|
||||
current_app.logger.error(msg_str.format(e))
|
||||
db.session.rollback
|
||||
db.session.rollback() # fixed line
|
||||
raise e
|
||||
|
||||
def get_hashed_password(self, plain_text_password=None):
|
||||
|
Loading…
x
Reference in New Issue
Block a user