From a6b3561cf72454fb10a7b8b53bc0e2dc4bd954c8 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Mon, 1 Jul 2019 17:01:11 +0100 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20create=20new=20organisations=20?= =?UTF-8?q?with=20no=20crown=20status?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We need the crown status set so that we can let them accept the agreement online. --- app/main/forms.py | 7 +++++-- tests/app/main/views/organisations/test_organisation.py | 1 - 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/main/forms.py b/app/main/forms.py index 3267248c6..6ab4e1035 100644 --- a/app/main/forms.py +++ b/app/main/forms.py @@ -596,10 +596,13 @@ class OrganisationTypeForm(StripWhitespaceForm): class NewOrganisationForm( RenameOrganisationForm, - OrganisationTypeForm, + OrganisationOrganisationTypeForm, OrganisationCrownStatusForm, ): - pass + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + # Don’t offer the ‘not sure’ choice + self.crown_status.choices = self.crown_status.choices[:-1] class FreeSMSAllowance(StripWhitespaceForm): diff --git a/tests/app/main/views/organisations/test_organisation.py b/tests/app/main/views/organisations/test_organisation.py index 0430a2802..79f7a06bb 100644 --- a/tests/app/main/views/organisations/test_organisation.py +++ b/tests/app/main/views/organisations/test_organisation.py @@ -93,7 +93,6 @@ def test_page_to_create_new_organisation( ('radio', 'organisation_type', 'nhs'), ('radio', 'crown_status', 'crown'), ('radio', 'crown_status', 'non-crown'), - ('radio', 'crown_status', 'unknown'), ('hidden', 'csrf_token', ANY), ]