mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 16:51:11 +03:00
fix a typo
This commit is contained in:
parent
cd90ad2497
commit
a9a479a51b
@ -179,7 +179,7 @@ class DashboardView(APIView):
|
|||||||
user_inventory = get_user_queryset(request.user, models.Inventory)
|
user_inventory = get_user_queryset(request.user, models.Inventory)
|
||||||
inventory_with_failed_hosts = user_inventory.filter(hosts_with_active_failures__gt=0)
|
inventory_with_failed_hosts = user_inventory.filter(hosts_with_active_failures__gt=0)
|
||||||
user_inventory_external = user_inventory.filter(has_inventory_sources=True)
|
user_inventory_external = user_inventory.filter(has_inventory_sources=True)
|
||||||
# it there are *zero* inventories, this aggregrate query will be None, fall back to 0
|
# if there are *zero* inventories, this aggregrate query will be None, fall back to 0
|
||||||
failed_inventory = user_inventory.aggregate(Sum('inventory_sources_with_failures'))['inventory_sources_with_failures__sum'] or 0
|
failed_inventory = user_inventory.aggregate(Sum('inventory_sources_with_failures'))['inventory_sources_with_failures__sum'] or 0
|
||||||
data['inventories'] = {'url': reverse('api:inventory_list', request=request),
|
data['inventories'] = {'url': reverse('api:inventory_list', request=request),
|
||||||
'total': user_inventory.count(),
|
'total': user_inventory.count(),
|
||||||
|
Loading…
Reference in New Issue
Block a user