diff --git a/cove_ofds/process.py b/cove_ofds/process.py index 509fff2..e228259 100644 --- a/cove_ofds/process.py +++ b/cove_ofds/process.py @@ -298,6 +298,41 @@ def process(self, process_data: dict) -> dict: context["additional_checks"], lambda i: i["type"] ) + # The library returns *_name_does_not_match and *_reference_name_set_but_not_in_original as different types, + # but in this UI we don't care - we just want to show them as one section. + # So join the 2 types of errors into 1 list. + for f1, f2 in [ + ( + "node_phase_reference_name_does_not_match", + "node_phase_reference_name_set_but_not_in_original", + ), + ( + "span_phase_reference_name_does_not_match", + "span_phase_reference_name_set_but_not_in_original", + ), + ( + "contract_related_phase_reference_name_does_not_match", + "contract_related_phase_reference_name_set_but_not_in_original", + ), + ( + "node_organisation_reference_name_does_not_match", + "node_organisation_reference_name_set_but_not_in_original", + ), + ( + "span_organisation_reference_name_does_not_match", + "span_organisation_reference_name_set_but_not_in_original", + ), + ( + "phase_organisation_reference_name_does_not_match", + "phase_organisation_reference_name_set_but_not_in_original", + ), + ]: + new_list = context["additional_checks"].get(f1, []) + context[ + "additional_checks" + ].get(f2, []) + if new_list: + context["additional_checks"][f1] = new_list + with open(self.data_filename, "w") as fp: json.dump(context, fp, indent=4) diff --git a/cove_ofds/templates/cove_ofds/additional_checks_table.html b/cove_ofds/templates/cove_ofds/additional_checks_table.html index dfc1002..18dac9a 100644 --- a/cove_ofds/templates/cove_ofds/additional_checks_table.html +++ b/cove_ofds/templates/cove_ofds/additional_checks_table.html @@ -293,85 +293,6 @@
{% trans 'TODO' %}
-{% trans 'Node Id' %} | -{% trans 'Network ID' %} | -
---|---|
- {{ additional_check.node_id }} - | -- {{ additional_check.network_id }} - | -
{% trans 'TODO' %}
-{% trans 'Span Id' %} | -{% trans 'Network ID' %} | -
---|---|
- {{ additional_check.span_id }} - | -- {{ additional_check.network_id }} - | -
{% trans 'TODO' %}
-{% trans 'Contract Id' %} | -{% trans 'Network ID' %} | -
---|---|
- {{ additional_check.contract_id }} - | -- {{ additional_check.network_id }} - | -
{% trans 'TODO ' %}
-{% trans 'Field' %} | -{% trans 'Node Id' %} | -{% trans 'Network ID' %} | -
---|---|---|
- {{ additional_check.field }} - | -- {{ additional_check.node_id }} - | -- {{ additional_check.network_id }} - | -
{% trans 'TODO ' %}
-{% trans 'Field' %} | -{% trans 'Span Id' %} | -{% trans 'Network ID' %} | -
---|---|---|
- {{ additional_check.field }} - | -- {{ additional_check.span_id }} - | -- {{ additional_check.network_id }} - | -
{% trans 'TODO ' %}
-{% trans 'Phase Id' %} | -{% trans 'Network ID' %} | -
---|---|
- {{ additional_check.phase_id }} - | -- {{ additional_check.network_id }} - | -
{% trans 'Your data contains nodes with international connections that do not specify a country. `.country` must be set for each international connection in `/nodes/internationalConnections`.' %}