Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions src/vfb/curation/curation_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,13 +291,21 @@ def object_kwarg_proc(rw):
if o_is_ind:
self.warn(context_name="object",
context=o,
message="You can't classify an individual with an individual") # Better make exception ?
self.stat = False # Better try except here?
message="You can't classify an individual with an individual")
self.stat = False
else:
self.ew.add_named_type_ax(s=subject_id,
o=object_id,
edge_annotations=edge_annotations,
match_on='short_form')
# Check if object_id is a pipe-separated string of IDs
if '|' in object_id:
object_ids = object_id.split('|')
else:
object_ids = [object_id]

# Loop over each ID in object_ids and call add_named_type_ax for each one
for oid in object_ids:
self.ew.add_named_type_ax(s=subject_id,
o=oid.strip(),
edge_annotations=edge_annotations,
match_on='short_form')
return True
elif r in self.relation_lookup.keys():
relation_id = self.relation_lookup[r]
Expand Down