Skip to content

Commit

Permalink
@bandi-search-filters: registered for a more generic interface (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
daniele-andreotti authored Feb 21, 2024
1 parent adc322f commit afee7d5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<plone:service
method="GET"
factory=".get.BandiSearchFiltersGet"
for="plone.app.contenttypes.interfaces.IFolder"
for="plone.dexterity.interfaces.IDexterityContainer"
permission="zope2.View"
name="@bandi-search-filters"
/>
Expand Down
5 changes: 3 additions & 2 deletions src/design/plone/policy/restapi/bandi_search_filters/get.py
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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:
Expand Down

0 comments on commit afee7d5

Please sign in to comment.