diff --git a/flask_sqlalchemy_caching/core.py b/flask_sqlalchemy_caching/core.py index e86b2f7..f53a751 100644 --- a/flask_sqlalchemy_caching/core.py +++ b/flask_sqlalchemy_caching/core.py @@ -129,7 +129,7 @@ def key_from_query(self, qualifier=None): particular Query, then combining that with the bound parameter values. """ stmt = self.with_labels().statement - key = str(stmt.compile(compile_kwargs={'literal_binds': True})) + key = stmt.compile(compile_kwargs={'literal_binds': True}).__str__() return md5(key.encode('utf8')).hexdigest()