mirror of
https://github.com/pds-nest/nest.git
synced 2024-11-22 13:04:19 +00:00
🐛 Fix parameters bug
This commit is contained in:
parent
d5ef97e128
commit
c3d08f1eee
1 changed files with 2 additions and 2 deletions
|
@ -27,7 +27,7 @@ def page_repository_conditions(rid):
|
||||||
return json_success([u.condition.to_json() for u in repository.uses])
|
return json_success([u.condition.to_json() for u in repository.uses])
|
||||||
|
|
||||||
if request.method == "POST":
|
if request.method == "POST":
|
||||||
if not (type_ := request.json.get("type")):
|
if (type_ := request.json.get("type")) is None:
|
||||||
return json_error("Missing `type` parameter."), 400
|
return json_error("Missing `type` parameter."), 400
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -38,7 +38,7 @@ def page_repository_conditions(rid):
|
||||||
if not (content := request.json.get("content")):
|
if not (content := request.json.get("content")):
|
||||||
return json_error("Missing `content` parameter."), 400
|
return json_error("Missing `content` parameter."), 400
|
||||||
|
|
||||||
if not (repo_id := request.json.get("id")):
|
if (repo_id := request.json.get("id")) is None:
|
||||||
return json_error("Missing `id` parameter."), 400
|
return json_error("Missing `id` parameter."), 400
|
||||||
|
|
||||||
condition = Condition(content=content, type=type_)
|
condition = Condition(content=content, type=type_)
|
||||||
|
|
Loading…
Reference in a new issue