From 03eee64364014a8ee7a8d9ea39fb14ee0f6a894a Mon Sep 17 00:00:00 2001 From: Andrea Cecchi Date: Thu, 28 Mar 2024 16:02:57 +0100 Subject: [PATCH] fix list of skipped fields in serializer/deserializer --- CHANGES.rst | 2 ++ src/redturtle/volto/restapi/deserializer/blocks.py | 10 ++++++++-- src/redturtle/volto/restapi/serializer/blocks.py | 10 ++++++++-- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 901da6e..aa2f0b9 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -8,6 +8,8 @@ Changelog [cekk] - Add flag in controlpanel to enable/disable INameChooser customization. [cekk] +- Exclude bg_color from transformed fields in deserializer. + [cekk] 5.4.8 (2024-03-19) diff --git a/src/redturtle/volto/restapi/deserializer/blocks.py b/src/redturtle/volto/restapi/deserializer/blocks.py index da3d4a9..78e6610 100644 --- a/src/redturtle/volto/restapi/deserializer/blocks.py +++ b/src/redturtle/volto/restapi/deserializer/blocks.py @@ -9,8 +9,14 @@ from zope.interface import implementer -EXCLUDE_KEYS = ["@type", "token", "value", "@id", "query"] -EXCLUDE_TYPES = ["title", "listing", "calendar", "searchEvents", "form"] +EXCLUDE_KEYS = ["@type", "token", "value", "@id", "query", "bg_color"] +EXCLUDE_TYPES = [ + "title", + "listing", + "calendar", + "searchEvents", + "form", +] class GenericResolveUIDDeserializer(object): diff --git a/src/redturtle/volto/restapi/serializer/blocks.py b/src/redturtle/volto/restapi/serializer/blocks.py index c026526..f65eb18 100644 --- a/src/redturtle/volto/restapi/serializer/blocks.py +++ b/src/redturtle/volto/restapi/serializer/blocks.py @@ -13,8 +13,14 @@ from zope.interface import implementer -EXCLUDE_KEYS = ["@type"] -EXCLUDE_TYPES = ["title", "listing", "form"] +EXCLUDE_KEYS = ["@type", "token", "value", "@id", "query", "bg_color"] +EXCLUDE_TYPES = [ + "title", + "listing", + "calendar", + "searchEvents", + "form", +] class GenericResolveUIDSerializer(object):