Skip to content
Permalink
Browse files
fix: bulk-import of multiple resource link values
resolves #9
  • Loading branch information
lrosenth committed Aug 14, 2019
1 parent 1a7df45 commit 6ef8908ca4fb260865a252546e60381352e1b6b8
Showing with 5 additions and 1 deletion.
  1. +5 −1 knora/knora.py
@@ -1525,7 +1525,11 @@ def process_properties(propinfo: Dict, valuestr: any):
raise KnoraError(resclass + " requires exactly one " + prop_info["propname"] + "-value: several supplied!")
for p in properties[prop_info["propname"]]:
xmlopt, value = process_properties(prop_info, p)
pnode = self.new_xml_element(self.proj_prefix + ':' + prop_info["propname"], xmlopt, value)
if xmlopt['knoraType'] == 'link_value':
pnode = self.new_xml_element(self.proj_prefix + ':' + prop_info["propname"])
pnode.append(self.new_xml_element(self.proj_prefix + ':' + prop_info["otype"], xmlopt, value))
else:
pnode = self.new_xml_element(self.proj_prefix + ':' + prop_info["propname"], xmlopt, value)
resnode.append(pnode)
else:
xmlopt, value = process_properties(prop_info, properties[prop_info["propname"]])

0 comments on commit 6ef8908

Please sign in to comment.