mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 07:46:23 -04:00
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:
@@ -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:
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user