remove org categories from service setup flow

This commit is contained in:
stvnrlly
2022-09-12 16:30:15 +00:00
parent 1c3faaf5cc
commit 0db9653638
2 changed files with 7 additions and 17 deletions

View File

@@ -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(

View File

@@ -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)