Closes #3151: Add inventory item count to manufacturers list

This commit is contained in:
Jeremy Stretch
2019-05-29 15:20:36 -04:00
parent 823257ca72
commit a6ff6505c6
3 changed files with 19 additions and 7 deletions

View File

@@ -516,6 +516,7 @@ class RackReservationBulkDeleteView(PermissionRequiredMixin, BulkDeleteView):
class ManufacturerListView(ObjectListView):
queryset = Manufacturer.objects.annotate(
devicetype_count=Count('device_types', distinct=True),
inventoryitem_count=Count('inventory_items', distinct=True),
platform_count=Count('platforms', distinct=True),
)
table = tables.ManufacturerTable