mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-25 00:33:58 -04:00
Only show active providers when changing priority
This fixes a bug where a third inactive provider would (potentially) appear in place of one of the two active ones, depending on the order of its identifier compared to the other two. In future we may look at simplifying this to cope with more than two active providers. For now, the existing UI will continue to work when we add a new, inactive SMS provider for Reach.
This commit is contained in:
@@ -65,6 +65,7 @@ def edit_sms_provider_ratio():
|
||||
provider
|
||||
for provider in provider_client.get_all_providers()['provider_details']
|
||||
if provider['notification_type'] == 'sms'
|
||||
and provider['active']
|
||||
], key=itemgetter('identifier'), reverse=True)
|
||||
|
||||
form = AdminProviderRatioForm(ratio=providers[0]['priority'])
|
||||
|
||||
Reference in New Issue
Block a user