From: hernani Date: Wed, 13 Mar 2013 23:08:25 +0000 (+0000) Subject: Fix in query cache X-Git-Tag: live~34 X-Git-Url: https://git.openstreetmap.org./osqa.git/commitdiff_plain/ec62bc84aa89b5e946104bc4dcdf78f382c90165?ds=sidebyside Fix in query cache git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@1283 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- diff --git a/forum/models/base.py b/forum/models/base.py index a5f74eb..912c21a 100644 --- a/forum/models/base.py +++ b/forum/models/base.py @@ -181,8 +181,10 @@ class CachedQuerySet(models.query.QuerySet): try: return md5(unicode(self.query).encode("utf-8")).hexdigest() except: - return md5(self.query).hexdigest() - + try: + return md5(self.query).hexdigest() + except: + return md5(str(self.query)).hexdigest() class CachedManager(models.Manager):