order LocationGroups by their category first
This commit is contained in:
parent
47a2a713f6
commit
5d336d218a
2 changed files with 20 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue