diff --git a/backend/audit/fixtures/workbooks/should_pass/cluster_names/tests-cluster-names.xlsx b/backend/audit/fixtures/workbooks/should_pass/cluster_names/tests-cluster-names.xlsx index 265665067f..7b255935ec 100644 Binary files a/backend/audit/fixtures/workbooks/should_pass/cluster_names/tests-cluster-names.xlsx and b/backend/audit/fixtures/workbooks/should_pass/cluster_names/tests-cluster-names.xlsx differ diff --git a/backend/audit/intakelib/checks/check_cluster_names.py b/backend/audit/intakelib/checks/check_cluster_names.py index aa3f2c9465..a18a3d2e9d 100644 --- a/backend/audit/intakelib/checks/check_cluster_names.py +++ b/backend/audit/intakelib/checks/check_cluster_names.py @@ -4,12 +4,10 @@ from django.conf import settings from audit.intakelib.intermediate_representation import get_range_by_name from audit.intakelib.common import get_message, build_cell_error_tuple +from .check_cluster_total import NOT_APPLICABLE, OTHER_CLUSTER, STATE_CLUSTER logger = logging.getLogger(__name__) -STATE_CLUSTER = "STATE CLUSTER" -OTHER_CLUSTER = "OTHER CLUSTER NOT LISTED ABOVE" - def check_cluster_names(ir): """Check that cluster names are valid when present.""" @@ -29,7 +27,8 @@ def check_cluster_names(ir): for index, value in enumerate(range_data["values"]): if value and value not in ( - valid_json["cluster_names"] + [STATE_CLUSTER, OTHER_CLUSTER] + valid_json["cluster_names"] + + [STATE_CLUSTER, OTHER_CLUSTER, NOT_APPLICABLE] ): errors.append( build_cell_error_tuple( diff --git a/backend/audit/intakelib/checks/check_cluster_total.py b/backend/audit/intakelib/checks/check_cluster_total.py index 32a0ba3932..1a0374be21 100644 --- a/backend/audit/intakelib/checks/check_cluster_total.py +++ b/backend/audit/intakelib/checks/check_cluster_total.py @@ -9,6 +9,7 @@ logger = logging.getLogger(__name__) +# A copy of theses constants exists in schema/source/base/Base.libsonnet STATE_CLUSTER = "STATE CLUSTER" OTHER_CLUSTER = "OTHER CLUSTER NOT LISTED ABOVE" NOT_APPLICABLE = "N/A" diff --git a/backend/audit/intakelib/checks/check_other_cluster_names.py b/backend/audit/intakelib/checks/check_other_cluster_names.py index 57de4dd0e6..b9a5674929 100644 --- a/backend/audit/intakelib/checks/check_other_cluster_names.py +++ b/backend/audit/intakelib/checks/check_other_cluster_names.py @@ -1,11 +1,10 @@ import logging from audit.intakelib.intermediate_representation import get_range_by_name from audit.intakelib.common import get_message, build_cell_error_tuple +from .check_cluster_total import OTHER_CLUSTER logger = logging.getLogger(__name__) -OTHER_CLUSTER = "OTHER CLUSTER NOT LISTED ABOVE" - def other_cluster_names(ir): cluster_name = get_range_by_name(ir, "cluster_name") diff --git a/backend/audit/intakelib/checks/check_state_cluster_names.py b/backend/audit/intakelib/checks/check_state_cluster_names.py index 8e984eebbc..b4929b2802 100644 --- a/backend/audit/intakelib/checks/check_state_cluster_names.py +++ b/backend/audit/intakelib/checks/check_state_cluster_names.py @@ -1,11 +1,10 @@ import logging from audit.intakelib.intermediate_representation import get_range_by_name from audit.intakelib.common import get_message, build_cell_error_tuple +from .check_cluster_total import STATE_CLUSTER logger = logging.getLogger(__name__) -STATE_CLUSTER = "STATE CLUSTER" - def state_cluster_names(ir): cluster_name = get_range_by_name(ir, "cluster_name") diff --git a/backend/dissemination/views.py b/backend/dissemination/views.py index 78988318f9..1f18ce6c9e 100644 --- a/backend/dissemination/views.py +++ b/backend/dissemination/views.py @@ -132,6 +132,7 @@ def get(self, request, *args, **kwargs): { "form": form, "state_abbrevs": STATE_ABBREVS, + "summary_report_download_limit": SUMMARY_REPORT_DOWNLOAD_LIMIT, }, )