From 442d1c60d935e13675502773fc0abfa8156efa8a Mon Sep 17 00:00:00 2001 From: stefanogoldoni Date: Sat, 15 May 2021 16:46:31 +0200 Subject: [PATCH] minor bug fixing --- nest_backend/routes/repository/alerts/alert.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nest_backend/routes/repository/alerts/alert.py b/nest_backend/routes/repository/alerts/alert.py index 6ad44d7..67a41f2 100644 --- a/nest_backend/routes/repository/alerts/alert.py +++ b/nest_backend/routes/repository/alerts/alert.py @@ -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']