Skip to content

Commit

Permalink
adds conditional to prevent nonetype error
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlosCoelhoSL committed Aug 5, 2024
1 parent d6710cd commit 06af0af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion application/templates/fact.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ <h1 class="govuk-heading-xl govuk-!-margin-bottom-0">Fact</h1>
{%- elif field == 'value' and fact['field'] in ["geometry","point"] %}
<div class="app-code-block">{{ fact[field] }}</div>
{%- elif field == 'entity-name' %}
<a class ="govuk-link" href="/curie/{{ fact['entity-prefix'] + ':' + fact['entity-reference'] }}">{{ fact[field] }}</a>
<a class ="govuk-link" href="/curie/{{ fact['entity-prefix'] + ':' + fact['entity-reference'] if fact['entity-prefix'] and fact['entity-reference'] else '#'}}">{{ fact[field] }}</a>
{%- elif field == 'reference-entity' %}
<a class ="govuk-link" href="/entity/{{ fact[field] }}">{{ fact[field] }}</a>
{%- else %}
Expand Down

0 comments on commit 06af0af

Please sign in to comment.