Skip to content

Commit

Permalink
adapt for Plone 4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
erral committed Oct 17, 2023
1 parent 4c79191 commit efb7e2b
Showing 1 changed file with 20 additions and 10 deletions.
30 changes: 20 additions & 10 deletions src/plone/restapi/services/site/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit efb7e2b

Please sign in to comment.