Skip to content

#61: Address a regression in the original fix #70

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

Merged
merged 1 commit into from
Sep 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions netbox_branching/models/branches.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,11 @@ def sync(self, user, commit=True):

try:
with activate_branch(self):
with transaction.atomic():
with transaction.atomic(using=self.connection_name):
# Apply each change from the main schema
for change in self.get_unsynced_changes().order_by('time'):
logger.debug(f'Applying change: {change}')
change.apply()
change.apply(using=self.connection_name)
if not commit:
raise AbortTransaction()

Expand Down
Loading