Skip to content

Commit

Permalink
feat: Don't throw "no institution" exception for an asset with an ext…
Browse files Browse the repository at this point in the history
…ernal link. refs #129722
  • Loading branch information
Delsin Van Grembergen committed Sep 3, 2024
1 parent fa9f77b commit cd01dca
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/elody/policies/tenant_id_resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ def _get_tenant_id_from_body(self, item, soft_call=False):
return "tenant:super"
if item.get("type") in self.global_types or item.get("type") == "institution":
return "tenant:super"
if item.get("type") == "asset":
for relation in item.get("relations", []):
if relation.get("type") in ["hasArchesLink"]:
return "tenant:super"
institution_id = get_item_metadata_value(item, "institution")
if not institution_id:
for relation in item.get("relations", []):
Expand Down

0 comments on commit cd01dca

Please sign in to comment.