X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/a2ec2f27ec1831bb0df68aba082d75a260a1a205..ec62bc84aa89b5e946104bc4dcdf78f382c90165:/forum/models/base.py 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):