fix(domain): bound public report input sizes
This commit is contained in:
1 parent
1c2bfa9594
commit
c0a6f6286e
7 files changed
+39
-4
No files matched your search
@@ -143,6 +143,8 @@ def calculate_payload(payload: dict[str, Any]) -> dict[str, Any]:
|
||||
raw_extras = payload.get("extra_kittens", [])
|
||||
if not isinstance(raw_extras, (list, tuple)):
|
||||
raise ApiError("Поле extra_kittens должно быть списком")
|
||||
if len(raw_extras) > 49:
|
||||
raise ApiError("В одном заходе может участвовать не более 50 котят")
|
||||
extras_list = []
|
||||
for item in raw_extras:
|
||||
if isinstance(item, dict):
|
||||
|
||||
Reference in new issue
Block a user