From 85b1c6c63f157dae20a089e2e545d674b719bc64 Mon Sep 17 00:00:00 2001 From: Roman <72063601+folix-01@users.noreply.github.com> Date: Mon, 9 Oct 2023 17:24:46 +0200 Subject: [PATCH 1/2] Patch the plone.app.redirector.FourOhFourView.search_for_similar (#79) * Patch the plone.app.redirector.FourOhFourView.search_for_similar * Typo * Fix readme --- CHANGES.rst | 8 +++++--- README.rst | 6 ++++++ src/redturtle/volto/monkey.py | 15 +++++++++++++++ src/redturtle/volto/monkey.zcml | 7 +++++++ 4 files changed, 33 insertions(+), 3 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index e7361e7e..be9a7ebe 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,15 +4,17 @@ Changelog 5.2.5 (unreleased) ------------------ -- Nothing changed yet. +- plone.app.redirector.FourOhFourView.search_for_similar patch to enable conditionally + the search for similar + [folix-01] 5.2.4 (2023-09-26) ------------------ - Fix the issue in the @translation GET endpoint: If this - endpoint is invoked, possibly by a bot, and plone.app.multilingual - is not installed, the call will result in an empty search query + endpoint is invoked, possibly by a bot, and plone.app.multilingual + is not installed, the call will result in an empty search query on the catalog. [lucabel] diff --git a/README.rst b/README.rst index b2046a45..2272c917 100644 --- a/README.rst +++ b/README.rst @@ -220,6 +220,12 @@ For details see the `pull-request + From f0f0771d35a29f17500b82bbfd7c287b3fe35c30 Mon Sep 17 00:00:00 2001 From: Roman Date: Tue, 10 Oct 2023 15:24:12 +0200 Subject: [PATCH 2/2] noqa --- src/redturtle/volto/monkey.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/redturtle/volto/monkey.py b/src/redturtle/volto/monkey.py index 532680e8..8ccb51af 100644 --- a/src/redturtle/volto/monkey.py +++ b/src/redturtle/volto/monkey.py @@ -154,7 +154,7 @@ def search_for_similar(*args, **kwargs): if ( os.environ.get("REDTURTLE_VOLTO_ENABLE_SEARCH_FOR_SIMILAR", default=None) - and original_obj + and original_obj # noqa ): return original_obj._old_search_for_similar()