Skip to content

Commit

Permalink
swap negative check of dict for postivie, re #11583
Browse files Browse the repository at this point in the history
  • Loading branch information
whatisgalen committed Nov 1, 2024
1 parent 9007af9 commit 07fb6d6
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions arches/app/models/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -902,15 +902,18 @@ def get_relations(
and str(resourceinstancefrom_graphid) in readable_graphids
):
try:
if f'{relation["relationshiptype"]}{lang}' not in preflabel_lookup:
if f'{relation["relationshiptype"]}{lang}' in preflabel_lookup:
preflabel = preflabel_lookup[
f'{relation["relationshiptype"]}{lang}'
]
else:
preflabel = get_preflabel_from_valueid(
relation["relationshiptype"], lang
)
preflabel_lookup[f'{relation["relationshiptype"]}{lang}'] = (
get_preflabel_from_valueid(
relation["relationshiptype"], lang
)
preflabel
)
preflabel = preflabel_lookup[
f'{relation["relationshiptype"]}{lang}'
]

relation["relationshiptype_label"] = preflabel["value"] or ""
except:
relation["relationshiptype_label"] = (
Expand Down

0 comments on commit 07fb6d6

Please sign in to comment.