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 #35425 -- Avoided INSERT with force_update and explicit pk. #18131

Merged
merged 1 commit into from
May 7, 2024

Conversation

jacobtylerwalls
Copy link
Member

@jacobtylerwalls jacobtylerwalls commented May 4, 2024

Trac ticket number

ticket-35425

Branch description

Allows force_update=True to issue an UPDATE when saving instances with explicit pk's (but where the field happened to have a default pk) as envisioned in ticket-29260.

Affected models where the primary key field is defined with a default or db_default, such as UUIDField.

Checklist

  • This PR targets the main branch.
  • The commit message is written in past tense, mentions the ticket number, and ends with a period.
  • I have checked the "Has patch" ticket flag in the Trac system.
  • I have added or updated relevant tests.
  • I have added or updated relevant docs, including release notes if applicable.
  • I have attached screenshots in both light and dark modes for any UI changes.

Affected models where the primary key field is defined with a
default or db_default, such as UUIDField.
Copy link
Contributor

@sarahboyce sarahboyce left a comment

Choose a reason for hiding this comment

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

Thank you!

@sarahboyce sarahboyce merged commit ceea86b into django:main May 7, 2024
34 checks passed
@jacobtylerwalls jacobtylerwalls deleted the force-update-known-pk branch May 7, 2024 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants