-
-
Notifications
You must be signed in to change notification settings - Fork 373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error with current user route and its Pydantic model #1000
Comments
Hi @JimScope! Could you show us how you configured the Beanie model and the Pydantic schemas? |
Thanks to reply @frankie567 . I have not changed anything from the example that is in the repo. Attached the MongoDB Atlas database document |
As you can see the id value exists in the document, however it is not retrieved when the /me path is used. Returning a null value |
After checking, the |
Should be fixed in v10.0.5 🎉 |
Describe the bug
In beanie the id field returns null when the Current User path is used. Like nested documents.
To Reproduce
Steps to reproduce the behavior:
svn export https://github.com/fastapi-users/fastapi-users/trunk/examples/beanie
Expected behavior
{"id":"d23d8h293dj3298","email":"user@example.com","is_active":true,"is_superuser":false,"is_verified":false,"messages":[{"foo": "bar"}]}
but the id field and other custom field return null
{"id":null,"email":"user@example.com","is_active":true,"is_superuser":false,"is_verified":false,"messages":null}
Configuration
FastAPI Users configuration
None.
Additional context
None.
The text was updated successfully, but these errors were encountered: