1
Fork 0
mirror of https://github.com/pds-nest/nest.git synced 2025-02-16 12:43:58 +00:00

aggiunte exceptions

This commit is contained in:
stefanogoldoni 2021-05-15 11:20:36 +02:00
parent 0b30b333fb
commit 1836945813

View file

@ -114,6 +114,9 @@ def page_condition(cid):
if condition.repository not in user.owner_or and not user.isAdmin:
return json_error("You lack the authorization to proceed, pal."), 403
if request.method == "PATCH":
if request.json is None:
return json_error("Missing json content."), 400
if (type_ := request.json.get("type")) is not None:
try:
type_ = ConditionType(type_)