diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2010-02-11 13:10:52 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2010-02-11 13:10:52 +0000 |
| commit | a9282168f5952cfb5c7008c603aed78aaff142b2 (patch) | |
| tree | de757dde12921f510cc89a7278cb1dae7c06826b | |
| parent | 3792b2cd9f0c84f29ec4300eba7bd443452c4a25 (diff) | |
[1.1.X] Fixed #12189 -- Corrected rollback behavior in database cache backend. Thanks to Lakin Wecker for the report.
Backport of r12409 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@12413 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/core/cache/backends/db.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/core/cache/backends/db.py b/django/core/cache/backends/db.py index eb459a076d..1853db097f 100644 --- a/django/core/cache/backends/db.py +++ b/django/core/cache/backends/db.py @@ -65,7 +65,7 @@ class CacheClass(BaseCache): cursor.execute("INSERT INTO %s (cache_key, value, expires) VALUES (%%s, %%s, %%s)" % self._table, [key, encoded, str(exp)]) except DatabaseError: # To be threadsafe, updates/inserts are allowed to fail silently - transaction.rollback() + transaction.rollback_unless_managed() return False else: transaction.commit_unless_managed() |
