From efb7e2b7d6b24b88f3fceea3fd69e6c97eee41d6 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Tue, 17 Oct 2023 17:04:58 +0200 Subject: [PATCH] adapt for Plone 4.3 --- src/plone/restapi/services/site/get.py | 30 +++++++++++++++++--------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/src/plone/restapi/services/site/get.py b/src/plone/restapi/services/site/get.py index eb3b2e6ffe..377c2468ef 100644 --- a/src/plone/restapi/services/site/get.py +++ b/src/plone/restapi/services/site/get.py @@ -37,24 +37,34 @@ def __call__(self, expand=False): registry = getUtility(IRegistry) if ISiteSchema is not None: - site_settings = registry.forInterface(ISiteSchema, prefix="plone", check=False) - result["site"].update({ - "plone.site_logo": site_settings.site_logo and getSiteLogo() or None, - "plone.robots_txt": site_settings.robots_txt, - }) + site_settings = registry.forInterface( + ISiteSchema, prefix="plone", check=False + ) + result["site"].update( + { + "plone.site_logo": site_settings.site_logo + and getSiteLogo() + or None, + "plone.robots_txt": site_settings.robots_txt, + } + ) if IImagingSchema is not None: image_settings = registry.forInterface( IImagingSchema, prefix="plone", check=False ) - result["site"].update({ - "plone.allowed_sizes": image_settings.allowed_sizes, - }) + result["site"].update( + { + "plone.allowed_sizes": image_settings.allowed_sizes, + } + ) - result["site"].update({ + result["site"].update( + { "plone.site_title": portal_state.portal_title(), "plone.allowed_sizes": image_settings.allowed_sizes, - }) + } + ) return result