We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 684d20d commit 8d680b5Copy full SHA for 8d680b5
raven/contrib/django/models.py
@@ -175,8 +175,13 @@ def register_handlers():
175
# HACK: support Sentry's internal communication
176
if 'sentry' in django_settings.INSTALLED_APPS:
177
from django.db import transaction
178
+ # Django 1.6
179
+ if hasattr(transaction, 'atomic'):
180
+ commit_on_success = transaction.atomic
181
+ else:
182
+ commit_on_success = transaction.commit_on_success
183
- @transaction.commit_on_success
184
+ @commit_on_success
185
def wrap_sentry(request, **kwargs):
186
if transaction.is_dirty():
187
transaction.rollback()
0 commit comments