You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
A clear and concise description of what the bug is.
.model_dump tries to call the .model_dump method of a pydantic model which is embedded inside a Beanie Document, which is not yet an actual pydantic model, but instead a NotAnObject. As a workaround, we are referencing the parameter which forces the data to be parsed.
Interestingly, we do not see this behavior with the include parameter on .model_dump, and instead it works as expected.
pydantic_core._pydantic_core.PydanticSerializationError: Error calling function `<lambda>`: AttributeError: 'NotAnObject' object has no attribute 'model_dump'
Describe the bug
A clear and concise description of what the bug is.
.model_dump tries to call the .model_dump method of a pydantic model which is embedded inside a Beanie Document, which is not yet an actual pydantic model, but instead a NotAnObject. As a workaround, we are referencing the parameter which forces the data to be parsed.
Interestingly, we do not see this behavior with the include parameter on .model_dump, and instead it works as expected.
To Reproduce
Exception:
This, however, works:
Expected behavior
We are expecting it to return a dictionary with all the keys except for "name"
The text was updated successfully, but these errors were encountered: