summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBertrand Bordage <bordage.bertrand@gmail.com>2017-06-03 09:00:54 (GMT)
committerBertrand Bordage <bordage.bertrand@gmail.com>2017-06-03 09:00:54 (GMT)
commit85ebf42353e5f8f460eaeb8961df0c8e78b9fdc8 (patch)
treeea9265fb5c90651c57c3f0222f7f29c46f467218
parentf86a56d110132dce5679dbf126546e47d24250f7 (diff)
downloaddjango-cachalot-85ebf42353e5f8f460eaeb8961df0c8e78b9fdc8.zip
django-cachalot-85ebf42353e5f8f460eaeb8961df0c8e78b9fdc8.tar.gz
django-cachalot-85ebf42353e5f8f460eaeb8961df0c8e78b9fdc8.tar.bz2
Fixes Python 2.
-rw-r--r--cachalot/utils.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/cachalot/utils.py b/cachalot/utils.py
index 11017fd..5102aa2 100644
--- a/cachalot/utils.py
+++ b/cachalot/utils.py
@@ -77,7 +77,8 @@ def get_query_cache_key(compiler):
"""
sql, params = compiler.as_sql()
check_parameter_types(params)
- cache_key = '%s:%s:%s' % (compiler.using, sql, [str(p) for p in params])
+ cache_key = '%s:%s:%s' % (compiler.using, sql,
+ [text_type(p) for p in params])
return sha1(cache_key.encode('utf-8')).hexdigest()