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

WIP: should this code snippet be used?

parent bd7899da
No related branches found
No related tags found
No related merge requests found
Pipeline #21412 passed
......@@ -172,6 +172,20 @@ class H5CFood(AbstractFileCFood):
self.to_be_inserted = db.Container()
self.insert_missing_structure(self.structure)
for el in self.to_be_inserted:
if isinstance(el, db.File):
el.retrieve()
valids = []
for el in self.to_be_inserted:
if el.is_valid():
valids.append(el.id)
for el in self.to_be_inserted:
if el.id is not None and el.id in valids:
self.to_be_inserted.remove(el)
# TODO this is a workaround due to the fact that the caosdb library
# changes the objects in the Container if it is inserted. The graph
# structure is flattened. I.e. references to other entity objects are
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment