Return to main provider page after editing ratio

Staying on the edit page is atypical behaviour for an edit form,
especially now it no longer shows the version history.
This commit is contained in:
Ben Thorner
2022-04-06 12:00:30 +01:00
parent a3231effb1
commit 66335d20c2
2 changed files with 2 additions and 2 deletions

View File

@@ -77,7 +77,7 @@ def edit_sms_provider_ratio():
if form.validate_on_submit():
provider_client.update_provider(first_provider['id'], form.percentage_left)
provider_client.update_provider(second_provider['id'], form.percentage_right)
return redirect(url_for('.edit_sms_provider_ratio'))
return redirect(url_for('.view_providers'))
return render_template(
'views/providers/edit-sms-provider-ratio.html',

View File

@@ -470,7 +470,7 @@ def test_should_update_priority_of_first_two_sms_providers(
'ratio': posted_number,
},
_expected_redirect=url_for(
'.edit_sms_provider_ratio',
'.view_providers',
_external=True,
),
)