diff --git a/dcicutils/portal_object_utils.py b/dcicutils/portal_object_utils.py index 7e48ce69f..c21315e00 100644 --- a/dcicutils/portal_object_utils.py +++ b/dcicutils/portal_object_utils.py @@ -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