From 099c8e560d2b5f8409f423856fda65aead5a7490 Mon Sep 17 00:00:00 2001 From: Ihor Marhitych Date: Fri, 17 Jan 2020 10:03:35 +0100 Subject: [PATCH] handle non-recursive path search in the ATRelativePathCriterionConverter --- news/541.bugfix | 2 ++ plone/app/contenttypes/migration/topics.py | 9 +++------ 2 files changed, 5 insertions(+), 6 deletions(-) create mode 100644 news/541.bugfix diff --git a/news/541.bugfix b/news/541.bugfix new file mode 100644 index 000000000..d85fc59df --- /dev/null +++ b/news/541.bugfix @@ -0,0 +1,2 @@ +handle non-recursive path search in the ATRelativePathCriterionConverter +[dest81] diff --git a/plone/app/contenttypes/migration/topics.py b/plone/app/contenttypes/migration/topics.py index d843cde93..d7fe8e025 100644 --- a/plone/app/contenttypes/migration/topics.py +++ b/plone/app/contenttypes/migration/topics.py @@ -426,13 +426,10 @@ class ATRelativePathCriterionConverter(CriterionConverter): operator_code = 'string.relativePath' def get_query_value(self, value, index, criterion): + path = criterion.getRelativePath() if not criterion.Recurse(): - logger.warn( - 'Cannot handle non-recursive path search. ' - 'Allowing recursive search. %r', - value, - ) - return criterion.getRelativePath() + path = path + '::1' + return path class ATSimpleIntCriterionConverter(CriterionConverter):