]> git.openstreetmap.org Git - osqa.git/commitdiff
Fix in query cache
authorhernani <hernani@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Wed, 13 Mar 2013 23:08:25 +0000 (23:08 +0000)
committerhernani <hernani@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Wed, 13 Mar 2013 23:08:25 +0000 (23:08 +0000)
git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@1283 0cfe37f9-358a-4d5e-be75-b63607b5c754

forum/models/base.py

index a5f74eb39821c17213094a40ff668e90240941fd..912c21ac768129ce66b8d955b5ee751e4869f3ea 100644 (file)
@@ -181,8 +181,10 @@ class CachedQuerySet(models.query.QuerySet):
         try:
             return md5(unicode(self.query).encode("utf-8")).hexdigest()
         except:
         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):
 
 
 class CachedManager(models.Manager):