From a80a843f59aca383f6b3cebe2c81e5ccd5654a74 Mon Sep 17 00:00:00 2001 From: Luca Bellenghi Date: Tue, 12 Mar 2024 16:09:32 +0100 Subject: [PATCH] fix problem with serializer hineritance --- CHANGES.rst | 3 +++ .../serializers/ovverrides/prenotazioniFolder.py | 11 +++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index b0abba8..92772de 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,9 @@ Changelog 1.2.3 (unreleased) ------------------ +- Fix problem with DefaultJSONSummarySerializer hineritance in prenotazioniFolder + DefaultJSONSummarySerializer override. + [lucabel] - Add the plone.restapi>=9.6.0 constaint. [folix-01] diff --git a/src/design/plone/ioprenoto/restapi/serializers/ovverrides/prenotazioniFolder.py b/src/design/plone/ioprenoto/restapi/serializers/ovverrides/prenotazioniFolder.py index 76a2243..7235e5f 100644 --- a/src/design/plone/ioprenoto/restapi/serializers/ovverrides/prenotazioniFolder.py +++ b/src/design/plone/ioprenoto/restapi/serializers/ovverrides/prenotazioniFolder.py @@ -1,6 +1,11 @@ +from design.plone.contenttypes.restapi.serializers.summary import ( + DefaultJSONSummarySerializer, +) +from design.plone.ioprenoto import PRENOTAZIONI_MANAGE_PERMISSION +from design.plone.ioprenoto.interfaces import IDesignPloneIoprenotoLayer from plone import api -from plone.restapi.interfaces import ISerializeToJson, ISerializeToJsonSummary -from plone.restapi.serializer.summary import DefaultJSONSummarySerializer +from plone.restapi.interfaces import ISerializeToJson +from plone.restapi.interfaces import ISerializeToJsonSummary from redturtle.prenotazioni.content.prenotazioni_folder import IPrenotazioniFolder from redturtle.prenotazioni.restapi.serializers.adapters.prenotazioni_folder import ( PrenotazioniFolderSerializer, @@ -8,8 +13,6 @@ from zope.component import adapter from zope.interface import implementer -from design.plone.ioprenoto import PRENOTAZIONI_MANAGE_PERMISSION -from design.plone.ioprenoto.interfaces import IDesignPloneIoprenotoLayer # TODO: move to registry PRENOTAZIONE_APPUNTAMENTO_ADDRESS = "prenotazione-appuntamenti-uffici"