Skip to content

Commit

Permalink
If record does not exist, return "" (#1753)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesbiggs authored Nov 18, 2024
1 parent b64048e commit f05d491
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions etna/records/templatetags/records_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ def record_url(
form_group: use with results from search queries, value determines tna, nonTna results
"""
if not record:
return ""

if is_editorial and settings.FEATURE_RECORD_LINKS_GO_TO_DISCOVERY and record.iaid:
return TNA_URLS.get("discovery_rec_default_fmt").format(iaid=record.iaid)

Expand Down

0 comments on commit f05d491

Please sign in to comment.