mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 14:29:51 -04:00
Fix big numbers on new platform admin page
Turns out the counts were all showing as zero because the generator had already been consumed by the time we were trying to do the stats. Making it a list comprehension means it can’t get exhausted.
This commit is contained in:
@@ -76,7 +76,7 @@ def sum_service_usage(service):
|
||||
|
||||
|
||||
def filter_and_sort_services(services, trial_mode_services=False):
|
||||
return (
|
||||
return [
|
||||
service for service in sorted(
|
||||
services,
|
||||
key=lambda service: (
|
||||
@@ -87,7 +87,7 @@ def filter_and_sort_services(services, trial_mode_services=False):
|
||||
reverse=True,
|
||||
)
|
||||
if service['restricted'] == trial_mode_services
|
||||
)
|
||||
]
|
||||
|
||||
|
||||
def create_global_stats(services):
|
||||
|
||||
Reference in New Issue
Block a user