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

Use translation._state.adding to detect if value is new #328

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rwlogel
Copy link

@rwlogel rwlogel commented Nov 30, 2022

If you are using UUID primary fields as outlined here https://docs.djangoproject.com/en/3.2/ref/models/fields/#uuidfield for the translated fields then testing pk is None is not a valid way to identify if objects are being created, it should be using _state.adding

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.

None yet

1 participant