From b1ce406050371932a6a0eb137e4870c509f5fcb1 Mon Sep 17 00:00:00 2001 From: Ahmad Nofal Date: Thu, 7 Sep 2023 17:13:15 +0400 Subject: [PATCH] Fix issue for extra fields not appearing in the errors --- ninja/schema.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ninja/schema.py b/ninja/schema.py index 75735204d..0036d93e4 100644 --- a/ninja/schema.py +++ b/ninja/schema.py @@ -198,7 +198,7 @@ class Schema(BaseModel, metaclass=ResolverMetaclass): class Config: from_attributes = True # aka orm_mode - @model_validator(mode="before") + @model_validator(mode="after") def _run_root_validator(cls, values: Any, info: ValidationInfo) -> Any: values = DjangoGetter(values, cls, info.context) return values