Skip to content

Commit

Permalink
process.py: Pass whether record in context
Browse files Browse the repository at this point in the history
  • Loading branch information
Ed (ODSC) committed Dec 3, 2024
1 parent 028a076 commit f4e7171
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions cove_bods/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,11 @@ def process(self, process_data: dict) -> dict:
save_data = {
"schema_version_used": process_data['schema'].schema_version
}
if (packaging_version.parse(process_data['schema'].schema_version)
< packaging_version.parse("0.4")):
save_data["record_schema_used"] = False
else:
save_data["record_schema_used"] = True
with open(self.data_filename, "w") as fp:
json.dump(save_data, fp, indent=4)
# return
Expand Down
2 changes: 1 addition & 1 deletion cove_bods/templates/cove_bods/additional_checks_table.html
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@
{# Currently this applies to 0.4+ #}
<tr>
<td>
{% blocktrans %}<code>deathDate</code> is incorrect. Check that the date is not before the <code>birthDate</code> or in the future.{% endblocktrans %}
{% blocktrans %}<code>deathDate</code> is incorrect. Check that the date is not before the <code>birthDate</code>,in the future or more than 120 years after birth date.{% endblocktrans %}
</td>
<td>
<code>deathDate</code>: {{ additional_check.death_date }}
Expand Down
4 changes: 4 additions & 0 deletions cove_bods/templates/cove_bods/explore.html
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,11 @@ <h4>{% trans 'Person Statements' %}</h4>
{% endif %}
{% endfor %}

{% if record_schema_used %}
<h4>{% trans 'Relationship Statements' %}</h4>
{% else %}
<h4>{% trans 'Ownership or Control Statements' %}</h4>
{% endif %}

<p>{% trans 'Total Statements' %}: {{ statistics.count_ownership_or_control_statement }}</p>

Expand Down

0 comments on commit f4e7171

Please sign in to comment.