We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bf7e43d commit 3e84f57Copy full SHA for 3e84f57
redisgraph/query_result.py
@@ -143,7 +143,12 @@ def parse_scalar(self, cell):
143
scalar = None
144
145
elif scalar_type == ResultSetScalarTypes.VALUE_STRING:
146
- scalar = str(value)
+ if isinstance(value, bytes):
147
+ scalar = value.decode()
148
+ elif not isinstance(value, str):
149
+ scalar = str(value)
150
+ else:
151
+ scalar = value
152
153
elif scalar_type == ResultSetScalarTypes.VALUE_INTEGER:
154
scalar = int(value)
redisgraph/util.py
@@ -13,7 +13,10 @@ def quote_string(v):
13
quote_string wraps given v with quotes incase
14
v is a string.
15
"""
16
- if not isinstance(v, str):
+
17
+ if isinstance(v, bytes):
18
+ v = v.decode()
19
+ elif not isinstance(v, str):
20
return v
21
if len(v) == 0:
22
return '""'
0 commit comments