fix(applications): reject boolean numeric input

This commit is contained in:
nyan404 committed 2026-08-25 04:02:09 +03:00
1 parent 093e0f6f73
commit 947cebc256
3 files changed
+12

No files matched your search

+2
View File
@@ -29,6 +29,8 @@ class ApplicationError(ValueError):
def _positive_id(value: Any, label: str) -> int:
if isinstance(value, bool):
raise ApplicationError(f"{label} должно быть числом")
try:
result = int(value)
except (TypeError, ValueError) as exc: