Skip to content
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

Encode date objects #816

Merged
merged 3 commits into from
Jan 10, 2024
Merged

Encode date objects #816

merged 3 commits into from
Jan 10, 2024

Conversation

gsakkis
Copy link
Contributor

@gsakkis gsakkis commented Dec 26, 2023

  • Add a default custom encoder for datetime.date instances to encode them as datetimes with 00:00 time.
  • Remove the ad-hoc attempt to encode objects of unknown type by calling dict() and/or vars() on them.

Closes #736

@roman-right
Copy link
Member

Thank you for the PR @gsakkis

@roman-right roman-right merged commit e876e1a into BeanieODM:main Jan 10, 2024
21 checks passed
@roman-right roman-right mentioned this pull request Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Error when saving Documents with Fields of type date
2 participants