瀏覽代碼

Fixed RackGroup count

Jeremy Stretch 10 年之前
父節點
當前提交
57f6d45ee7
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      netbox/dcim/forms.py

+ 1 - 1
netbox/dcim/forms.py

@@ -77,7 +77,7 @@ class RackGroupBulkDeleteForm(ConfirmationForm):
 
 
 def rackgroup_site_choices():
-    site_choices = Site.objects.annotate(rack_count=Count('racks'))
+    site_choices = Site.objects.annotate(rack_count=Count('rack_groups'))
     return [(s.slug, '{} ({})'.format(s.name, s.rack_count)) for s in site_choices]