mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 15:31:15 -05:00
Add rest of user model fields to api.
First step to moving user interactions to api.
This commit is contained in:
@@ -8,7 +8,8 @@ from app.models import User
|
||||
|
||||
def save_model_user(usr, update_dict={}):
|
||||
if update_dict:
|
||||
del update_dict['id']
|
||||
if update_dict.get('id'):
|
||||
del update_dict['id']
|
||||
db.session.query(User).filter_by(id=usr.id).update(update_dict)
|
||||
else:
|
||||
db.session.add(usr)
|
||||
|
||||
Reference in New Issue
Block a user