mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-04 10:21:14 -05:00
Changes for pr comments
This commit is contained in:
@@ -15,10 +15,9 @@ from app.dao.dao_utils import (
|
|||||||
@versioned
|
@versioned
|
||||||
def save_model_api_key(api_key, update_dict={}):
|
def save_model_api_key(api_key, update_dict={}):
|
||||||
if update_dict:
|
if update_dict:
|
||||||
if update_dict.get('id'):
|
update_dict.pop('id', None)
|
||||||
del update_dict['id']
|
|
||||||
for key, value in update_dict.items():
|
for key, value in update_dict.items():
|
||||||
setattr(api_key, key, update_dict[key])
|
setattr(api_key, key, value)
|
||||||
db.session.add(api_key)
|
db.session.add(api_key)
|
||||||
else:
|
else:
|
||||||
if not api_key.id:
|
if not api_key.id:
|
||||||
|
|||||||
Reference in New Issue
Block a user