Skip to content

Commit

Permalink
minor portal_utils update
Browse files Browse the repository at this point in the history
  • Loading branch information
dmichaels-harvard committed Mar 13, 2024
1 parent 52c7308 commit 3adc9bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dcicutils/portal_object_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ def _normalize_data_refs(value: Any, refs: List[dict], schema: dict,
# so let us look it up here.
if isinstance(portal, Portal):
nlookups += 1
if (ref_object := portal.get_metadata(ref_path)) and (ref_uuid := ref_object.get("uuid")):
if ((ref_object := portal.get_metadata(ref_path, raise_exception=False)) and
(ref_uuid := ref_object.get("uuid"))):
return ref_uuid, nlookups
return value, nlookups

0 comments on commit 3adc9bd

Please sign in to comment.