mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-11 09:27:56 -04:00
Add permissions validation in service schema
This commit is contained in:
@@ -129,7 +129,10 @@ def update_service(service_id):
|
||||
|
||||
current_data = dict(service_schema.dump(fetched_service).data.items())
|
||||
current_data.update(request.get_json())
|
||||
update_dict = service_schema.load(current_data).data
|
||||
try:
|
||||
update_dict = service_schema.load(current_data).data
|
||||
except ValueError as e:
|
||||
raise InvalidRequest(str(e), status_code=400)
|
||||
dao_update_service(update_dict)
|
||||
|
||||
if service_going_live:
|
||||
|
||||
Reference in New Issue
Block a user