From eee145ee6728cc15f5b75711c4b435a1e1d58452 Mon Sep 17 00:00:00 2001 From: Jennifer Richards Date: Wed, 10 May 2023 19:19:39 -0300 Subject: [PATCH] fix: Explicitly order GroupTypeNames in active_group_types Relying on Meta.ordering to order querysets involving GROUP BY queries is deprecated and will be dropped in Django 3.1. --- ietf/group/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ietf/group/views.py b/ietf/group/views.py index 1749912ea..95bf4c5e9 100644 --- a/ietf/group/views.py +++ b/ietf/group/views.py @@ -317,6 +317,7 @@ def active_group_types(request): ] ) .filter(group__state="active") + .order_by('order', 'name') # default ordering ignored for "GROUP BY" queries, make it explicit .annotate(group_count=Count("group")) ) return render(request, "group/active_groups.html", {"grouptypes": grouptypes})