Skip to content

Commit

Permalink
Align with redturtle.prenotazioni>=2.0.1 version
Browse files Browse the repository at this point in the history
  • Loading branch information
folix-01 committed Oct 11, 2023
1 parent d08aaf6 commit 65911f2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"z3c.jbot",
"plone.api>=1.8.4",
"plone.app.dexterity",
"redturtle.prenotazioni>=2.0.0.rc2",
"redturtle.prenotazioni>=2.0.1",
"design.plone.policy",
],
extras_require={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@
from plone import api
from plone.restapi.interfaces import ISerializeToJson
from plone.restapi.interfaces import ISerializeToJsonSummary
from plone.restapi.serializer.dxcontent import SerializeFolderToJson
from plone.restapi.serializer.summary import DefaultJSONSummarySerializer
from redturtle.prenotazioni.content.prenotazioni_folder import IPrenotazioniFolder
from redturtle.prenotazioni.content.prenotazioni_folder import (
IPrenotazioniFolder,
)
from redturtle.prenotazioni.restapi.serializers.adapters.pernotazioni_folder import (
PrenotazioniFolderSerializer,
)
from zope.component import adapter
from zope.interface import implementer

Expand Down Expand Up @@ -38,7 +42,7 @@ def __call__(self, *args, **kwargs):

@implementer(ISerializeToJson)
@adapter(IPrenotazioniFolder, IDesignPloneIoprenotoLayer)
class SerializePrenotazioniFolderToJson(SerializeFolderToJson):
class SerializePrenotazioniFolderToJson(PrenotazioniFolderSerializer):
def __call__(self, *args, **kwargs):
resp = super().__call__(*args, **kwargs)
if not api.user.has_permission(
Expand Down

0 comments on commit 65911f2

Please sign in to comment.