From 95b74cbf5bae779b0f299274ec07bf302e518a12 Mon Sep 17 00:00:00 2001 From: Andrea Cecchi Date: Wed, 3 Apr 2024 10:59:34 +0200 Subject: [PATCH] json compatibility --- src/redturtle/voltoplugin/editablefooter/restapi/get.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/redturtle/voltoplugin/editablefooter/restapi/get.py b/src/redturtle/voltoplugin/editablefooter/restapi/get.py index 027d1cc..50ac7bb 100644 --- a/src/redturtle/voltoplugin/editablefooter/restapi/get.py +++ b/src/redturtle/voltoplugin/editablefooter/restapi/get.py @@ -2,6 +2,7 @@ from plone import api from plone.registry.interfaces import IRegistry from plone.restapi.interfaces import IBlockFieldSerializationTransformer +from plone.restapi.serializer.converters import json_compatible from plone.restapi.services import Service from redturtle.voltoplugin.editablefooter.interfaces import IEditableFooterSettings from redturtle.voltoplugin.editablefooter.restapi import fix_footer_top_blocks @@ -22,8 +23,6 @@ @implementer(IPublishTraverse) class FooterColumns(Service): - def __init__(self, context, request): - super(FooterColumns, self).__init__(context, request) def reply(self): record = api.portal.get_registry_record( @@ -54,7 +53,7 @@ def reply(self): item["text"]["data"] = item["text"]["data"].replace( 'href="/', f'href="{portal_url}/' ) - return data + return json_compatible(data) def get_portal_url(self): portal_url = api.portal.get().absolute_url()