Skip to content

Commit

Permalink
Update instance.py
Browse files Browse the repository at this point in the history
  • Loading branch information
olinux authored Aug 19, 2024
1 parent 5ae6d08 commit 4b4992e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pipeline/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ def _build_multi_instance_links(self, instanceReferenceList:List) -> str:

def _build_instance_library_link(self, instanceReferenceList:List[Dict]) -> str:
# this function assumes that all instances in list have the same type
if "@id" not in instanceReferenceList[0]:
raise ValueError(f"Was not able to find id of instance {json.dumps(instanceReferenceList[0], indent=2)}")
instance_example_id = instanceReferenceList[0]["@id"]
instance_example_type = instance_example_id.split("/")[4]
instance_type_plural = self._build_plurals(instance_example_type)
Expand Down

0 comments on commit 4b4992e

Please sign in to comment.