1
Fork 0
mirror of https://github.com/pds-nest/nest.git synced 2024-11-25 06:24:19 +00:00

minor bug fixing

This commit is contained in:
stefanogoldoni 2021-05-15 16:46:31 +02:00
parent 29ec779203
commit 442d1c60d9

View file

@ -118,11 +118,11 @@ def page_alert(aid):
if not alert:
return json_error("Could not find alert."), 404
if alert.repository not in [a.repository for a in user.authorizations] + user.owner_of:
json_error("You are not authorized to proceed."), 403
return json_error("You are not authorized to proceed."), 403
if request.method == "GET":
return json_success(alert.to_json()), 200
if alert.repository not in user.owner_of:
json_error("You are not authorized to proceed."), 403
return json_error("You are not authorized to proceed."), 403
if request.method == "PATCH":
if 'name' in request.json:
alert.name = request.json['name']