Pass service_id through to API '/service/unique' endpoint

Notifications-api now needs the service_id to check the uniqueness of
the service name when trying to change it. This is to allow a user to
successfully change the pluralization or the case of their service name.
This commit is contained in:
Katie Smith
2018-02-13 11:27:57 +00:00
parent 0f20cfe8bc
commit 84d810b981
3 changed files with 4 additions and 4 deletions

View File

@@ -100,7 +100,7 @@ def service_name_change(service_id):
form.name.data = current_service.get('name')
if form.validate_on_submit():
unique_name = service_api_client.is_service_name_unique(form.name.data, email_safe(form.name.data))
unique_name = service_api_client.is_service_name_unique(service_id, form.name.data, email_safe(form.name.data))
if not unique_name:
form.name.errors.append("This service name is already in use")
return render_template('views/service-settings/name.html', form=form)