Skip to content

Commit

Permalink
#2403 Null checks
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-podolskiy90 committed Apr 23, 2024
1 parent 05e1a8e commit c90eff4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/webapp/WEB-INF/pages/manage/eml/taxcoverage.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -389,13 +389,15 @@
<div class="table-responsive">
<table class="table table-sm table-borderless">
<#list inferredMetadata.inferredTaxonomicCoverage.organizedData.keywords as k>
<#if k.rank?has_content && ranks.get(k.rank?string)?has_content && ((k.displayNames?size > 0) || inferredMetadata.inferredTaxonomicCoverage.rankWarnings.get(k.rank?string)?has_content) >
<#if k.rank?has_content && ranks.get(k.rank?string)?has_content && ((k.displayNames?size > 0) || (inferredMetadata.inferredTaxonomicCoverage.rankWarnings?has_content && inferredMetadata.inferredTaxonomicCoverage.rankWarnings.get(k.rank?string)?has_content)) >
<tr>
<#-- 1st col, write rank name once -->
<th class="col-4">${ranks.get(k.rank?html)?cap_first!}</th>
<#-- 2nd col, write comma separated list of names in format: scientific name (common name) -->
<td>
<#assign rankWarning=inferredMetadata.inferredTaxonomicCoverage.rankWarnings.get(k.rank?string)!""/>
<#if inferredMetadata.inferredTaxonomicCoverage.rankWarnings?has_content>
<#assign rankWarning=inferredMetadata.inferredTaxonomicCoverage.rankWarnings.get(k.rank?string)!""/>
</#if>

<#if rankWarning?has_content>
<code><@s.text name="${rankWarning}"/></code>
Expand Down

0 comments on commit c90eff4

Please sign in to comment.