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

fixed datetimes not being converted in models #518

Merged
merged 1 commit into from
Nov 27, 2021
Merged

fixed datetimes not being converted in models #518

merged 1 commit into from
Nov 27, 2021

Conversation

josephmancuso
Copy link
Member

@josephmancuso josephmancuso commented Nov 12, 2021

Closes #513
@girardinsamuel This should work right?

Copy link
Contributor

@girardinsamuel girardinsamuel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe... but I am not sure where this method is called. Maybe it would be ideal to write a unit test to cover those use cases:

import pendulum
now = pendulum.now()
# use case 1
User.create({"name": "John", "verified_at": now})
# use case 2
user = User.find(1)
user.update({"verified_at": now})
# use case 3
user = User.find(1)
user.verified_at = now
user.save()

@josephmancuso josephmancuso merged commit a74b0a5 into 1.0 Nov 27, 2021
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.

Creating or updating records with pendulum instance does not work
2 participants