Skip to content
Snippets Groups Projects
Commit aa20e7f8 authored by florian's avatar florian
Browse files

FIX: Correct handling of non-string values

parent a9f804d3
Branches
Tags
2 merge requests!53Release 0.1,!48F fix ident query
Pipeline #29074 passed
......@@ -52,11 +52,11 @@ def convert_value(value):
return str(value.id)
elif isinstance(value, datetime):
return value.isoformat()
elif isinstance(value, str):
elif type(value) == str:
# replace single quotes, otherwise they may break the queries
return str(value.replace("'", "\'"))
return value.replace("\'", "\\'")
else:
return value
return f"{value}"
class IdentifiableAdapter(metaclass=ABCMeta):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment