Skip to content

Commit 9b7647c

Browse files
committed
šŸ› convert_py_type_to_query_type in insert_entity
1 parent da5b8ad commit 9b7647c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

ā€Žros_typedb/ros_typedb/typedb_interface.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -820,10 +820,8 @@ def insert_entity(
820820
"""
821821
for attribute in attribute_list:
822822
if attribute[0] is not None:
823-
if isinstance(attribute[1], str):
824-
query += f""", has {attribute[0]} "{attribute[1]}" """
825-
else:
826-
query += f""", has {attribute[0]} {attribute[1]}"""
823+
value = self.convert_py_type_to_query_type(attribute[1])
824+
query += f""", has {attribute[0]} {value} """
827825
query += ";"
828826
return self.insert_database(query)
829827

0 commit comments

Comments
Ā (0)