Skip to content

Commit

Permalink
Remove commit_on_success decorator and replace with atomic per Django…
Browse files Browse the repository at this point in the history
… deprication policy.
  • Loading branch information
patrickbeeson committed Nov 10, 2014
1 parent dcbb060 commit 79fdefd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nested_inline/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def all_valid_with_nesting(self, formsets):
return True

@csrf_protect_m
@transaction.commit_on_success
@transaction.atomic
def add_view(self, request, form_url='', extra_context=None):
"The 'add' admin view for this model."
model = self.model
Expand Down Expand Up @@ -238,7 +238,7 @@ def add_view(self, request, form_url='', extra_context=None):
return self.render_change_form(request, context, form_url=form_url, add=True)

@csrf_protect_m
@transaction.commit_on_success
@transaction.atomic
def change_view(self, request, object_id, form_url='', extra_context=None):
"The 'change' admin view for this model."
model = self.model
Expand Down

0 comments on commit 79fdefd

Please sign in to comment.