order groups correctly in editor
This commit is contained in:
parent
27287b8a00
commit
a61807640b
1 changed files with 1 additions and 1 deletions
|
@ -98,7 +98,7 @@ class EditorFormBase(I18nModelFormMixin, ModelForm):
|
|||
LocationGroupCategory = self.request.changeset.wrap_model('LocationGroupCategory')
|
||||
|
||||
kwargs = {'allow_'+self._meta.model._meta.default_related_name: True}
|
||||
categories = LocationGroupCategory.objects.filter(**kwargs).prefetch_related('groups').order_by('priority')
|
||||
categories = LocationGroupCategory.objects.filter(**kwargs).prefetch_related('groups')
|
||||
if self.instance.pk:
|
||||
instance_groups = tuple(self.instance.groups.values_list('pk', flat=True))
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue