mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-10 10:03:21 -04:00
add get_active_services method
* all current invocations of get_services now call get_active_services EXCEPT for platform admin page (where we want to see inactive services * cleaned up parameter names and unpacking (since *params is unhelpful) * fixed incorrect kwarg name in conftest
This commit is contained in:
@@ -12,7 +12,7 @@ def choose_service():
|
||||
return render_template(
|
||||
'views/choose-service.html',
|
||||
services=[ServicesBrowsableItem(x) for x in
|
||||
service_api_client.get_services({'user_id': current_user.id})['data']],
|
||||
service_api_client.get_active_services({'user_id': current_user.id})['data']],
|
||||
can_add_service=is_gov_user(current_user.email_address)
|
||||
)
|
||||
|
||||
@@ -23,7 +23,7 @@ def show_all_services_or_dashboard():
|
||||
if not current_user.is_authenticated:
|
||||
return redirect(url_for('.index'))
|
||||
|
||||
services = service_api_client.get_services({'user_id': current_user.id})['data']
|
||||
services = service_api_client.get_active_services({'user_id': current_user.id})['data']
|
||||
|
||||
if 1 == len(services):
|
||||
return redirect(url_for('.service_dashboard', service_id=services[0]['id']))
|
||||
|
||||
Reference in New Issue
Block a user