Skip to content

INTPYTHON-355 Add transaction.atomic() #357

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

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

timgraham
Copy link
Collaborator

@timgraham timgraham commented Aug 6, 2025

No description provided.

@timgraham timgraham marked this pull request as ready for review August 8, 2025 19:15
Comment on lines +153 to +156
self.session = None
# Tracks if the connection is in a transaction managed by
# django_mongodb_backend.transaction.atomic. `in_atomic_block` isn't
# used in case Django's atomic() (used internally in Django) is called
Copy link
Contributor

Choose a reason for hiding this comment

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

💯

# The first item in the tuple (an empty list) is normally the
# savepoint IDs, which isn't applicable on MongoDB.
self.run_on_commit.append(([], func, robust))
else:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Mh, elif could be use with rebuts then else for the rest.

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.

3 participants