Replace "primary", etc. with "first", etc.

Using "primary" made sense when the other "secondary" provider was
new, but today we see them as equivalent and the terminology is a
bit confusing. In future we may add a third provider as well.
This commit is contained in:
Ben Thorner
2022-03-25 16:37:36 +00:00
parent 55e2a2f96b
commit 59f6b0b5d8
2 changed files with 10 additions and 10 deletions

View File

@@ -73,19 +73,19 @@ def edit_sms_provider_ratio():
if len(providers) < 2:
abort(400)
primary_provider, secondary_provider = providers[0:2]
first_provider, second_provider = providers[0:2]
if form.validate_on_submit():
provider_client.update_provider(primary_provider['id'], form.percentage_left)
provider_client.update_provider(secondary_provider['id'], form.percentage_right)
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 render_template(
'views/providers/edit-sms-provider-ratio.html',
versions=_chunk_versions_by_day(_get_versions_since_switchover(primary_provider['id'])),
versions=_chunk_versions_by_day(_get_versions_since_switchover(first_provider['id'])),
form=form,
primary_provider=providers[0]['display_name'],
secondary_provider=providers[1]['display_name'],
first_provider=providers[0]['display_name'],
second_provider=providers[1]['display_name'],
)