Stop expecting letter contact block in service JSON

We’re removing it for performance reasons.

This means removing the old pages that edited the letter contact block
when it was stored directly on the service, rather than the current
model where a service can have multiple contact blocks.
This commit is contained in:
Chris Hill-Scott
2020-06-22 09:58:00 +01:00
parent 2f1e8b104b
commit 45697aac43
4 changed files with 0 additions and 128 deletions

View File

@@ -864,29 +864,6 @@ def service_delete_sms_sender(service_id, sms_sender_id):
return redirect(url_for('.service_sms_senders', service_id=service_id))
@main.route("/services/<uuid:service_id>/service-settings/set-letter-contact-block", methods=['GET', 'POST'])
@user_has_permissions('manage_service')
def service_set_letter_contact_block(service_id):
if not current_service.has_permission('letter'):
abort(403)
form = ServiceLetterContactBlockForm(letter_contact_block=current_service.letter_contact_block)
if form.validate_on_submit():
current_service.update(
letter_contact_block=form.letter_contact_block.data.replace('\r', '') or None
)
if request.args.get('from_template'):
return redirect(
url_for('.view_template', service_id=service_id, template_id=request.args.get('from_template'))
)
return redirect(url_for('.service_settings', service_id=service_id))
return render_template(
'views/service-settings/set-letter-contact-block.html',
form=form
)
@main.route("/services/<uuid:service_id>/service-settings/set-free-sms-allowance", methods=['GET', 'POST'])
@user_is_platform_admin
def set_free_sms_allowance(service_id):

View File

@@ -36,7 +36,6 @@ class Service(JSONModel):
'id',
'inbound_api',
'letter_branding',
'letter_contact_block',
'message_limit',
'name',
'prefix_sms',

View File

@@ -299,7 +299,6 @@ class HeaderNavigation(Navigation):
'service_set_inbound_sms',
'service_set_international_sms',
'service_set_letter_branding',
'service_set_letter_contact_block',
'service_set_letters',
'service_set_reply_to_email',
'service_set_sms_prefix',
@@ -460,7 +459,6 @@ class MainNavigation(Navigation):
'service_set_inbound_number',
'service_set_inbound_sms',
'service_set_international_sms',
'service_set_letter_contact_block',
'service_set_letters',
'service_set_reply_to_email',
'service_set_sms_prefix',
@@ -908,7 +906,6 @@ class CaseworkNavigation(Navigation):
'service_set_inbound_number',
'service_set_inbound_sms',
'service_set_international_sms',
'service_set_letter_contact_block',
'service_set_letters',
'service_set_reply_to_email',
'service_set_sms_prefix',
@@ -1206,7 +1203,6 @@ class OrgNavigation(Navigation):
'service_set_inbound_number',
'service_set_inbound_sms',
'service_set_international_sms',
'service_set_letter_contact_block',
'service_set_letters',
'service_set_reply_to_email',
'service_set_sms_prefix',