From c9a05832c1ce4213fb11eedd82af7679f80e8142 Mon Sep 17 00:00:00 2001 From: Sage Abdullah Date: Wed, 6 Mar 2024 10:36:13 +0000 Subject: [PATCH] Evaluate tagged item pks in tag+search workaround instead of using a subquery The query seems quite complex to be a subquery --- wagtail/admin/filters.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wagtail/admin/filters.py b/wagtail/admin/filters.py index f4d5c9db52..54be084f34 100644 --- a/wagtail/admin/filters.py +++ b/wagtail/admin/filters.py @@ -227,7 +227,7 @@ class PopularTagsFilter(django_filters.MultipleChoiceFilter): return filtered # Workaround for https://github.com/wagtail/wagtail/issues/6616 - pks = filtered.values_list("pk", flat=True) + pks = list(filtered.values_list("pk", flat=True)) return qs.filter(pk__in=pks)