Explorar el Código

Tweaked ordering of tags list

Jeremy Stretch hace 7 años
padre
commit
601fb418b5
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      netbox/utilities/views.py

+ 1 - 1
netbox/utilities/views.py

@@ -121,7 +121,7 @@ class ObjectListView(View):
 
         # Construct queryset for tags list
         if hasattr(model, 'tags'):
-            tags = model.tags.annotate(count=Count('taggit_taggeditem_items'))
+            tags = model.tags.annotate(count=Count('taggit_taggeditem_items')).order_by('-count', 'name')
         else:
             tags = None