From 0db96536381fe3eafa9735fff08d88f80ac4c18d Mon Sep 17 00:00:00 2001 From: stvnrlly Date: Mon, 12 Sep 2022 16:30:15 +0000 Subject: [PATCH] remove org categories from service setup flow --- app/main/forms.py | 9 +-------- app/main/views/add_service.py | 15 ++++++--------- 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/app/main/forms.py b/app/main/forms.py index 0cbed0e20..507d36851 100644 --- a/app/main/forms.py +++ b/app/main/forms.py @@ -1298,14 +1298,7 @@ class CreateServiceForm(StripWhitespaceForm): MustContainAlphanumericCharacters(), Length(max=255, message='Service name must be 255 characters or fewer') ]) - organisation_type = OrganisationTypeField('Who runs this service?') - - -class CreateNhsServiceForm(CreateServiceForm): - organisation_type = OrganisationTypeField( - 'Who runs this service?', - include_only={'nhs_central', 'nhs_local', 'nhs_gp'}, - ) + # organisation_type = OrganisationTypeField('Who runs this service?') class AdminNewOrganisationForm( diff --git a/app/main/views/add_service.py b/app/main/views/add_service.py index 646fcc463..ab8375cb6 100644 --- a/app/main/views/add_service.py +++ b/app/main/views/add_service.py @@ -5,7 +5,7 @@ from notifications_python_client.errors import HTTPError from app import service_api_client from app.formatters import email_safe from app.main import main -from app.main.forms import CreateNhsServiceForm, CreateServiceForm +from app.main.forms import CreateServiceForm from app.utils.user import user_is_gov_user, user_is_logged_in @@ -45,14 +45,11 @@ def _create_example_template(service_id): @user_is_logged_in @user_is_gov_user def add_service(): - default_organisation_type = current_user.default_organisation_type - if default_organisation_type == 'nhs': - form = CreateNhsServiceForm() - default_organisation_type = None - else: - form = CreateServiceForm( - organisation_type=default_organisation_type - ) + # default_organisation_type = current_user.default_organisation_type + default_organisation_type = 'central' + form = CreateServiceForm( + organisation_type=default_organisation_type + ) if form.validate_on_submit(): email_from = email_safe(form.name.data)