Skip to content
Snippets Groups Projects
Commit 9a6a07ba authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

wip

parent 055ca88c
No related branches found
No related tags found
2 merge requests!91Release 0.3,!70ListConverter treats StructureElements
Pipeline #30609 passed
......@@ -812,6 +812,8 @@ class ListElementConverter(Converter):
children.append(TextElement(str(index), list_element))
elif isinstance(list_element, dict):
children.append(DictElement(str(index), list_element))
elif isinstance(list_element, StructureElement):
children.append(list_element)
else:
raise NotImplementedError(
f"Unkown type {type(list_element)} in list element {list_element}.")
......
......@@ -463,7 +463,9 @@ class CaosDBIdentifiableAdapter(IdentifiableAdapter):
candidates = db.execute_query(query_string)
if len(candidates) > 1:
raise RuntimeError(
f"Identifiable was not defined unambigiously.\n{query_string}\nReturned the following {candidates}.")
f"Identifiable was not defined unambigiously.\n{query_string}\nReturned the "
f"following {candidates}."
f"Identifiable:\n{identifiable.record_type}{identifiable.properties}")
if len(candidates) == 0:
return None
return candidates[0]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment