Skip to content

Commit

Permalink
fix: bulk-import of multiple resource link values
Browse files Browse the repository at this point in the history
resolves #9
  • Loading branch information
lrosenth committed Aug 14, 2019
1 parent 1a7df45 commit 6ef8908
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion knora/knora.py
Expand Up @@ -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"]])
Expand Down

0 comments on commit 6ef8908

Please sign in to comment.