From f570a918dfc62651c1f9b5040eceba6d8992ad7a Mon Sep 17 00:00:00 2001 From: Jeremy Childers Date: Tue, 9 Jan 2024 16:23:38 -0500 Subject: [PATCH 1/3] Fix bug caused by child having multiple terms set under the index sort classifier --- coderedcms/models/page_models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coderedcms/models/page_models.py b/coderedcms/models/page_models.py index 27d33617..1756b58b 100755 --- a/coderedcms/models/page_models.py +++ b/coderedcms/models/page_models.py @@ -489,7 +489,7 @@ def get_index_children(self): classifier=self.index_order_by_classifier, # Reverse ManyToMany of `coderedpage.classifier_terms`. coderedpage=models.OuterRef("pk"), - ) + )[:1] query = query.annotate( term_sort_order=models.Subquery(terms.values("sort_order")) ) From 91577accf67d8338c4226318d13a273a833d74d3 Mon Sep 17 00:00:00 2001 From: Jeremy Childers Date: Tue, 9 Jan 2024 16:40:28 -0500 Subject: [PATCH 2/3] Fix spelling error --- docs/releases/v3.0.2.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/releases/v3.0.2.rst b/docs/releases/v3.0.2.rst index d4286546..7d00f213 100644 --- a/docs/releases/v3.0.2.rst +++ b/docs/releases/v3.0.2.rst @@ -5,7 +5,7 @@ v3.0.2 release notes Bug fixes --------- -* Fix site search: when searching by specific page models (``search_filterable=True``) on MySQL databases, no search results would be returned. We have applied a workaround to this bug in Wagtail, with one small caveat: for example when filtering by a model ``WebPage``, the search results on SQLite and Postgres will return results for ``WebPage`` and anything inherting from ``WebPage``. On MySQL, it will ONLY return ``WebPage`` results. *However, the bug still persists in the Wagtail Admin search and will need to be fixed in a future version of Wagtail.* +* Fix site search: when searching by specific page models (``search_filterable=True``) on MySQL databases, no search results would be returned. We have applied a workaround to this bug in Wagtail, with one small caveat: for example when filtering by a model ``WebPage``, the search results on SQLite and Postgres will return results for ``WebPage`` and anything inheriting from ``WebPage``. On MySQL, it will ONLY return ``WebPage`` results. *However, the bug still persists in the Wagtail Admin search and will need to be fixed in a future version of Wagtail.* Thank you! From b9a047d7ccc681d5eb43987f5d3b1246bcf6939d Mon Sep 17 00:00:00 2001 From: Jeremy Childers Date: Wed, 10 Jan 2024 11:58:43 -0500 Subject: [PATCH 3/3] Alter docs python version --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e0010501..7d7fcf36 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -153,7 +153,7 @@ stages: - task: UsePythonVersion@0 displayName: 'Use Python version' inputs: - versionSpec: '3.12' + versionSpec: '3.11' architecture: 'x64' - script: python -m pip install -r requirements-ci.txt