Revision f77af2cc
b/snf-common/synnefo/lib/db/xctx.py | ||
---|---|---|
110 | 110 |
trigger_postprocess = False |
111 | 111 |
try: |
112 | 112 |
if value is not None: # exception |
113 |
if transaction.is_dirty(using=db): |
|
113 |
if transaction.is_dirty(using=db) or True: |
|
114 |
# Rollback, even if is not dirty. |
|
115 |
# This is a temporary bug fix for |
|
116 |
# https://code.djangoproject.com/ticket/9964 . |
|
117 |
# Django prior to 1.3 does not set a transaction |
|
118 |
# dirty when the DB throws an exception, and thus |
|
119 |
# does not trigger rollback, resulting in a |
|
120 |
# dangling aborted DB transaction. |
|
114 | 121 |
transaction.rollback(using=db) |
115 | 122 |
else: |
116 | 123 |
if transaction.is_dirty(using=db): |
Also available in: Unified diff