From e0172ec17e09b19f24302ca5f87ba2e2fe5e42b1 Mon Sep 17 00:00:00 2001 From: Yaroslav Benin Date: Tue, 26 Sep 2023 15:30:11 +0400 Subject: [PATCH] '__fields__' changed to model_fields to remove warning. --- flask_pydantic/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flask_pydantic/core.py b/flask_pydantic/core.py index 912415a..4930dad 100644 --- a/flask_pydantic/core.py +++ b/flask_pydantic/core.py @@ -182,7 +182,7 @@ def wrapper(*args, **kwargs): body_model = body_in_kwargs or body if body_model: body_params = get_body_dict(**(get_json_params or {})) - if "__root__" in body_model.__fields__: + if "__root__" in body_model.model_fields: try: b = body_model(__root__=body_params).__root__ except ValidationError as ve: