erp5_hal_json_style: check if isWebMode is present before calling it.

(cherry picked from commit ee7cb2097c4da4bf9a0a7afca1ff2726aa92b2ef)
parent 072ceb2a
......@@ -341,7 +341,8 @@ portal = context.getPortalObject()\n
sql_catalog = portal.portal_catalog.getSQLCatalog()\n
\n
# Calculate the site root to prevent unexpected browsing\n
is_web_mode = (context.REQUEST.get(\'current_web_section\', None) is not None) or context.isWebMode()\n
is_web_mode = (context.REQUEST.get(\'current_web_section\', None) is not None) or (hasattr(context, \'isWebMode\') and context.isWebMode())\n
# is_web_mode = traversed_document.isWebMode()\n
if is_web_mode:\n
site_root = context.getWebSectionValue()\n
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment