Skip to content

Commit

Permalink
#61: Address a regression in the original fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremystretch committed Sep 4, 2024
1 parent f6db858 commit ac74cb2
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit ac74cb2

Please sign in to comment.