Remove checks for renaming without changes

When checking the service or organisation name for uniqueness before
changing it, it would be necessary to exclude the current name from
this check. However now we are changing it immediately we don’t need
to guard around this behaviour of the uniqueness check.

So this commit removes the guard for both renaming a service and an
organisation.
This commit is contained in:
Chris Hill-Scott
2022-01-13 10:20:43 +00:00
parent 24ff80280e
commit 3ab30f27b6
4 changed files with 0 additions and 43 deletions

View File

@@ -317,9 +317,6 @@ def edit_organisation_name(org_id):
if form.validate_on_submit():
if form.name.data == current_organisation.name:
return redirect(url_for('.organisation_settings', org_id=current_organisation.id))
try:
current_organisation.update(name=form.name.data)
except HTTPError as http_error:

View File

@@ -96,9 +96,6 @@ def service_name_change(service_id):
if form.validate_on_submit():
if form.name.data == current_service.name:
return redirect(url_for('.service_settings', service_id=service_id))
try:
current_service.update(
name=form.name.data,