Skip to content

Conversation

@mattwang44
Copy link
Contributor

Describe the change

  • Issue: When baker.make with _fill_optional set as True, the values of those DateTimeField with auto_now_add=True or auto_now=True from the resulting instance are different from the value stored in DB.
    • The test case from the first commit is to reproduce the issue image
  • solution: skip the auto datetime fields

PR Checklist

  • Change is covered with tests
  • CHANGELOG.md is updated if needed

@mattwang44
Copy link
Contributor Author

mattwang44 commented Oct 10, 2024

could possibly resolve #469

Copy link
Member

@amureki amureki left a comment

Choose a reason for hiding this comment

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

@mattwang44 thank you for your first contribution! I am happy that you managed to figure out the issue and find your way through the code. 👍

@amureki amureki merged commit c0af32a into model-bakers:main Feb 11, 2025
@mattwang44 mattwang44 deleted the fix/auto-now-with-fill-optional branch February 12, 2025 02:29
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.

2 participants