fix: added strict validation to all ingress ints

This commit is contained in:
ITQ committed 2025-01-24 18:09:37 +03:00
1 parent ead34fd867
commit fe2bc038a9
3 files changed
+15 -16

No files matched your search

+3 -2
View File
@@ -2,16 +2,17 @@ import uuid
from typing import ClassVar
from ninja import ModelSchema, Schema
from pydantic import Field
from pydantic import Field, StrictInt
from apps.user.models import User
class UserTarget(ModelSchema):
age: StrictInt
class Meta:
model = User
fields: ClassVar[list[str]] = [
User.age.field.name,
User.country.field.name,
]