Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[1.1.X] Corrected merge of r12411 to 1.1.X branch (see r12415).

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@12416 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 0e9f1553e1e5766559b077483ae445af11d9bb82 1 parent f764d7f
@freakboy3742 freakboy3742 authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  django/core/cache/backends/db.py
View
3  django/core/cache/backends/db.py
@@ -81,7 +81,8 @@ def delete(self, key):
def has_key(self, key):
now = datetime.now().replace(microsecond=0)
cursor = connection.cursor()
- cursor.execute("SELECT cache_key FROM %s WHERE cache_key = %%s and expires > %%s" % self._table, [key, now])
+ cursor.execute("SELECT cache_key FROM %s WHERE cache_key = %%s and expires > %%s" % self._table,
+ [key, connection.ops.value_to_db_datetime(now)])
return cursor.fetchone() is not None
def _cull(self, cursor, now):
Please sign in to comment.
Something went wrong with that request. Please try again.