Changeset - 502d2fcbe434
[Not reviewed]
default
0 1 0
Mads Kiilerich - 6 years ago 2019-12-31 15:39:17
mads@kiilerich.com
Grafted from: 1dbe8152c839
py3: use str instead of safe_unicode when we just need a stable string for everything
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/caching_query.py
Show inline comments
 
@@ -24,7 +24,7 @@ from sqlalchemy.orm.interfaces import Ma
 
from sqlalchemy.orm.query import Query
 
from sqlalchemy.sql import visitors
 

	
 
from kallithea.lib.utils2 import safe_str, safe_unicode
 
from kallithea.lib.utils2 import safe_str
 

	
 

	
 
class CachingQuery(Query):
 
@@ -141,7 +141,7 @@ def _get_cache_parameters(query):
 
        args = _params_from_query(query)
 
        args.append(query._limit)
 
        args.append(query._offset)
 
        cache_key = " ".join(safe_unicode(x) for x in args)
 
        cache_key = " ".join(str(x) for x in args)
 

	
 
    if cache_key is None:
 
        raise Exception('Cache key cannot be None')
0 comments (0 inline, 0 general)