order LocationGroups by their category first

This commit is contained in:
Laura Klünder 2017-07-11 17:41:16 +02:00
parent 47a2a713f6
commit 5d336d218a
2 changed files with 20 additions and 1 deletions

View file

@ -185,7 +185,7 @@ class LocationGroup(Location, models.Model):
verbose_name = _('Location Group')
verbose_name_plural = _('Location Groups')
default_related_name = 'locationgroups'
ordering = ('-priority',)
ordering = ('-category__priority', '-priority')
def _serialize(self, **kwargs):
result = super()._serialize(**kwargs)