We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 415c319 commit aea0415Copy full SHA for aea0415
beanie/odm/utils/pydantic.py
@@ -30,7 +30,9 @@ def get_field_type(field):
30
31
def get_model_fields(model):
32
if IS_PYDANTIC_V2:
33
- return model.model_fields
+ if isinstance(model, type):
34
+ return model.model_fields
35
+ return model.__class__.model_fields
36
else:
37
return model.__fields__
38
pyproject.toml
@@ -99,7 +99,6 @@ testpaths = [
99
]
100
filterwarnings = [
101
"error",
102
- "ignore::DeprecationWarning",
103
"ignore::UserWarning",
104
105
asyncio_mode = "auto"
0 commit comments