Skip to content
Snippets Groups Projects

F h5 cfood

Merged Henrik tom Wörden requested to merge f-h5-cfood into dev
1 file
+ 3
2
Compare changes
  • Side-by-side
  • Inline
@@ -59,7 +59,7 @@ def collect_existing_structure(target_structure, existing_root, em):
@@ -59,7 +59,7 @@ def collect_existing_structure(target_structure, existing_root, em):
if prop.value is None:
if prop.value is None:
continue
continue
if not prop.is_reference():
if not prop.is_reference(server_retrieval=True):
continue
continue
# TODO case where multiple properties of same name exist is not
# TODO case where multiple properties of same name exist is not
@@ -70,6 +70,7 @@ def collect_existing_structure(target_structure, existing_root, em):
@@ -70,6 +70,7 @@ def collect_existing_structure(target_structure, existing_root, em):
resolve_reference(prop)
resolve_reference(prop)
# TODO Lists of reference are not yet treated properly
# TODO Lists of reference are not yet treated properly
 
resolve_reference(existing_root.get_property(prop.name))
referenced = existing_root.get_property(prop.name).value
referenced = existing_root.get_property(prop.name).value
if not isinstance(referenced, list):
if not isinstance(referenced, list):
@@ -107,7 +108,7 @@ def update_structure(em, updating: db.Container, target_structure: db.Record):
@@ -107,7 +108,7 @@ def update_structure(em, updating: db.Container, target_structure: db.Record):
em.to_existing[target_structure._cuid])
em.to_existing[target_structure._cuid])
for prop in target_structure.get_properties():
for prop in target_structure.get_properties():
if prop.is_reference():
if prop.is_reference(server_retrieval=True):
update_structure(em, updating, prop.value)
update_structure(em, updating, prop.value)
# TODO this can be moved to the general lib; it is the general case that
# TODO this can be moved to the general lib; it is the general case that
Loading