From b66423118e88f5649e3ae84fef75b88efdb6ca06 Mon Sep 17 00:00:00 2001 From: Daniele Andreotti Date: Wed, 21 Feb 2024 15:44:34 +0100 Subject: [PATCH] @bandi-search-filters: registered for a more generic interface --- CHANGES.rst | 3 ++- .../plone/policy/restapi/bandi_search_filters/configure.zcml | 2 +- src/design/plone/policy/restapi/bandi_search_filters/get.py | 5 +++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index f43c80f..50b3b57 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,7 +4,8 @@ Changelog 4.0.8 (unreleased) ------------------ -- Nothing changed yet. +- @bandi-search-filters: registered for a more generic interface. + [daniele] 4.0.7 (2024-02-20) diff --git a/src/design/plone/policy/restapi/bandi_search_filters/configure.zcml b/src/design/plone/policy/restapi/bandi_search_filters/configure.zcml index a8f4d4d..bc33372 100644 --- a/src/design/plone/policy/restapi/bandi_search_filters/configure.zcml +++ b/src/design/plone/policy/restapi/bandi_search_filters/configure.zcml @@ -16,7 +16,7 @@ diff --git a/src/design/plone/policy/restapi/bandi_search_filters/get.py b/src/design/plone/policy/restapi/bandi_search_filters/get.py index 05292a4..681333a 100644 --- a/src/design/plone/policy/restapi/bandi_search_filters/get.py +++ b/src/design/plone/policy/restapi/bandi_search_filters/get.py @@ -1,9 +1,10 @@ # -*- coding: utf-8 -*- from plone import api +from plone.dexterity.interfaces import IDexterityContainer from plone.restapi.services import Service +from redturtle.bandi.vocabularies import TipologiaBandoVocabularyFactory from zope.interface import implementer from zope.publisher.interfaces import IPublishTraverse -from redturtle.bandi.vocabularies import TipologiaBandoVocabularyFactory @implementer(IPublishTraverse) @@ -21,7 +22,7 @@ def reply(self): bandi_folder = None - if self.context.portal_type == "Folder": + if IDexterityContainer.providedBy(self.context): bandi_folder = self.context if bandi_folder: