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

resolve ref

parent 2f7cf3cb
No related branches found
No related tags found
1 merge request!8F h5 cfood
Pipeline #10311 failed
This commit is part of merge request !8. Comments created here will be created in the context of that merge request.
......@@ -59,7 +59,7 @@ def collect_existing_structure(target_structure, existing_root, em):
if prop.value is None:
continue
if not prop.is_reference():
if not prop.is_reference(server_retrieval=True):
continue
# TODO case where multiple properties of same name exist is not
......@@ -70,6 +70,7 @@ def collect_existing_structure(target_structure, existing_root, em):
resolve_reference(prop)
# 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
if not isinstance(referenced, list):
......@@ -107,7 +108,7 @@ def update_structure(em, updating: db.Container, target_structure: db.Record):
em.to_existing[target_structure._cuid])
for prop in target_structure.get_properties():
if prop.is_reference():
if prop.is_reference(server_retrieval=True):
update_structure(em, updating, prop.value)
# TODO this can be moved to the general lib; it is the general case that
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment