X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/e5cc68e7511d5c57b88a7acab4119f3cef55b1ce..a2ec2f27ec1831bb0df68aba082d75a260a1a205:/forum/models/base.py diff --git a/forum/models/base.py b/forum/models/base.py index 47f71e0..a5f74eb 100644 --- a/forum/models/base.py +++ b/forum/models/base.py @@ -178,7 +178,10 @@ class CachedQuerySet(models.query.QuerySet): yield row def _get_query_hash(self): - return md5(unicode(self.query).encode("utf-8")).hexdigest() + try: + return md5(unicode(self.query).encode("utf-8")).hexdigest() + except: + return md5(self.query).hexdigest()