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:
parent
0b30b333fb
commit
1836945813
1 changed files with 3 additions and 0 deletions
|
@ -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_)
|
||||
|
|
Loading…
Add table
Reference in a new issue