Skip to content

Comments

chore(nimbus): always use transaction.atomic for form saves#14189

Merged
jaredlockhart merged 1 commit intomainfrom
14188
Dec 15, 2025
Merged

chore(nimbus): always use transaction.atomic for form saves#14189
jaredlockhart merged 1 commit intomainfrom
14188

Conversation

@jaredlockhart
Copy link
Collaborator

Becuase

  • We recently saw races and collisions between forms and celery tasks saving the same instances
  • We can wrap both in transaction.atomic to ensure they occur separately

This commit

  • Wraps all form saves in transaction.atomic

fixes #14188

Becuase

* We recently saw races and collisions between forms and celery tasks saving the same instances
* We can wrap both in transaction.atomic to ensure they occur separately

This commit

* Wraps all form saves in transaction.atomic

fixes #14188
Copy link
Contributor

@yashikakhurana yashikakhurana left a comment

Choose a reason for hiding this comment

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

Totally, I am just wondering if there might be some easy way instead of adding it on all save 🤔, but totally works. Thank you @jaredlockhart

@jaredlockhart jaredlockhart added this pull request to the merge queue Dec 15, 2025
@jaredlockhart
Copy link
Collaborator Author

Yeah @yashikakhurana afaik this is the only way. I mean without doing some kind of metaclass hackery, but I generally try to avoid that.

Merged via the queue into main with commit 64376d5 Dec 15, 2025
16 checks passed
@jaredlockhart jaredlockhart deleted the 14188 branch December 15, 2025 17:58
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.

Use transaction.atomic for all form saves

2 participants