Merge branch 'develop' into develop-2.3

This commit is contained in:
Jeremy Stretch
2018-01-19 10:54:26 -05:00
29 changed files with 186 additions and 113 deletions

View File

@@ -802,7 +802,10 @@ class DeviceRoleBulkDeleteView(PermissionRequiredMixin, BulkDeleteView):
#
class PlatformListView(ObjectListView):
queryset = Platform.objects.annotate(device_count=Count('devices'))
queryset = Platform.objects.annotate(
device_count=Count('devices', distinct=True),
vm_count=Count('virtual_machines', distinct=True)
)
table = tables.PlatformTable
template_name = 'dcim/platform_list.html'