From aa20e7f8e20db8807511c6f05ba0a31a4b4f8e22 Mon Sep 17 00:00:00 2001
From: florian <f.spreckelsen@inidscale.com>
Date: Fri, 7 Oct 2022 14:58:11 +0200
Subject: [PATCH] FIX: Correct handling of non-string values

---
 src/caoscrawler/identifiable_adapters.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/caoscrawler/identifiable_adapters.py b/src/caoscrawler/identifiable_adapters.py
index 6399bd49..d4c2b1d0 100644
--- a/src/caoscrawler/identifiable_adapters.py
+++ b/src/caoscrawler/identifiable_adapters.py
@@ -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):
-- 
GitLab