Skip to content

Commit

Permalink
json compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
cekk committed Apr 3, 2024
1 parent 7bae14e commit 95b74cb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/redturtle/voltoplugin/editablefooter/restapi/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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(
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 95b74cb

Please sign in to comment.