Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #12189 -- Corrected rollback behavior in database cache backend…

…. Thanks to Lakin Wecker for the report.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12409 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 4d2f489bca6b1807724f4b619d70ae8d6d1bda08 1 parent 75ab212
Russell Keith-Magee authored February 11, 2010

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  django/core/cache/backends/db.py
2  django/core/cache/backends/db.py
@@ -65,7 +65,7 @@ def _base_set(self, mode, key, value, timeout=None):
65 65
                 cursor.execute("INSERT INTO %s (cache_key, value, expires) VALUES (%%s, %%s, %%s)" % self._table, [key, encoded, str(exp)])
66 66
         except DatabaseError:
67 67
             # To be threadsafe, updates/inserts are allowed to fail silently
68  
-            transaction.rollback()
  68
+            transaction.rollback_unless_managed()
69 69
             return False
70 70
         else:
71 71
             transaction.commit_unless_managed()

0 notes on commit 4d2f489

Please sign in to comment.
Something went wrong with that request. Please try again.