Skip to content

Conversation

@nicfar1708
Copy link

No description provided.

@mircealungu
Copy link
Member

mircealungu commented Dec 12, 2025

Dear @nicfar1708,

Thanks for identifying the problem and proposing a fix and sorry for the slow response time!

I think there's a simpler and more general solution: instead of fixing the insertion, we could fix the model defaults to use a callable:

  # Instead of (evaluated once at import):
  default=datetime.datetime.now(datetime.timezone.utc)

  # Use (evaluated each time):
  default=lambda: datetime.datetime.now(datetime.timezone.utc)

There are a few more instances of the problem than the ones you identified (you can find them by searching for default=datetime).

Would you like to try this fix?

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