Skip to content

Commit

Permalink
additional_checks: Fix count issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jarofgreen committed Dec 1, 2022
1 parent 46f63a7 commit 3bd7bfc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cove_ofds/templates/cove_ofds/additional_checks_table.html
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ <h4>
{% if 'duplicate_node_id' in additional_checks or 'duplicate_span_id' in additional_checks or 'duplicate_phase_id' in additional_checks or 'duplicate_organisation_id' in additional_checks or 'duplicate_contract_id' in additional_checks %}
<h4>
{% trans 'Non-unique identifiers' %}
{% include 'cove_ofds/additional_checks_table_failure_counter.html' with list1=additional_checks.node_organisation_reference_name_does_not_match list2=additional_checks.span_organisation_reference_name_does_not_match list3=additional_checks.phase_organisation_reference_name_does_not_match %}
{% include 'cove_ofds/additional_checks_table_failure_counter.html' with list1=additional_checks.duplicate_node_id list2=additional_checks.duplicate_span_id list3=additional_checks.duplicate_phase_id list4=additional_checks.duplicate_organisation_id list5=additional_checks.duplicate_contract_id %}
</h4>
<p>
{% trans 'Your data contains non-unique identifiers.' %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% load i18n %}

{% with l1l=list1|length l2l=list2|length l3l=list3|length%}
{% with count=l1l|add:l2l|add:l3l %}
{% with l1l=list1|length l2l=list2|length l3l=list3|length l4l=list4|length l5l=list5|length%}
{% with count=l1l|add:l2l|add:l3l|add:l4l|add:l5l %}
({% if count == 1 %}1 failure{% else %}{{ count }} {% trans 'failures' %}{% endif %})
{% endwith %}
{% endwith %}

0 comments on commit 3bd7bfc

Please sign in to comment.