--- a/rqlrewrite.py Wed Sep 16 17:22:41 2015 +0200
+++ b/rqlrewrite.py Wed Sep 16 18:40:03 2015 +0200
@@ -22,7 +22,7 @@
"""
__docformat__ = "restructuredtext en"
-from six import string_types
+from six import text_type, string_types
from rql import nodes as n, stmts, TypeResolverException
from rql.utils import common_parent
@@ -623,7 +623,7 @@
while argname in self.kwargs:
argname = subselect.allocate_varname()
subselect.add_constant_restriction(subselect.get_variable(self.u_varname),
- 'eid', unicode(argname), 'Substitute')
+ 'eid', text_type(argname), 'Substitute')
self.kwargs[argname] = self.session.user.eid
add_types_restriction(self.schema, subselect, subselect,
solutions=self.solutions)
@@ -762,7 +762,7 @@
# insert "U eid %(u)s"
stmt.add_constant_restriction(
stmt.get_variable(self.u_varname),
- 'eid', unicode(argname), 'Substitute')
+ 'eid', text_type(argname), 'Substitute')
self.kwargs[argname] = self.session.user.eid
return self.u_varname
key = (self.current_expr, self.varmap, vname)