mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 01:41:05 -05:00
Change Organisation DAO update method
- Changed the organisation DAO update method to only make 1 query - Updated the update rest endpoint to not return an organisation when the update is successful
This commit is contained in:
@@ -19,7 +19,7 @@ def dao_create_organisation(organisation):
|
||||
|
||||
|
||||
@transactional
|
||||
def dao_update_organisation(organisation, **kwargs):
|
||||
for key, value in kwargs.items():
|
||||
setattr(organisation, key, value)
|
||||
db.session.add(organisation)
|
||||
def dao_update_organisation(organisation_id, **kwargs):
|
||||
return Organisation.query.filter_by(id=organisation_id).update(
|
||||
kwargs
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user