Fixes Python 2.

This commit is contained in:
Bertrand Bordage 2017-06-03 11:00:54 +02:00
parent f86a56d110
commit 85ebf42353
1 changed files with 2 additions and 1 deletions

View File

@ -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()