From e1a91469444a8688497f352d42d4ec9467d873ec Mon Sep 17 00:00:00 2001 From: Wes Okes Date: Mon, 30 Oct 2023 12:15:15 -0400 Subject: [PATCH] order by sort order and id --- entity/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entity/models.py b/entity/models.py index 8085648..3852642 100644 --- a/entity/models.py +++ b/entity/models.py @@ -338,7 +338,7 @@ def get_membership_cache(self, group_ids=None, is_active=True): if group_ids: membership_queryset = membership_queryset.filter(entity_group_id__in=group_ids) - membership_queryset = membership_queryset.order_by('id') + membership_queryset = membership_queryset.order_by('sort_order', 'id') membership_queryset = membership_queryset.values_list('entity_group_id', 'entity_id', 'sub_entity_kind_id')