Commit d2c8a922 authored by Jérome Perrin's avatar Jérome Perrin

Make sure we can display ZMI when preference tool cannot be used.

parent 69684aac
from App.Management import Navigation from App.Management import Navigation
from ZODB.POSException import ConflictError
from Acquisition import aq_parent from Acquisition import aq_parent
import json import json
...@@ -9,7 +10,16 @@ def manage_page_footer(self): ...@@ -9,7 +10,16 @@ def manage_page_footer(self):
return default return default
portal = self.getPortalObject() portal = self.getPortalObject()
if portal.portal_preferences.getPreference('preferred_source_code_editor') != 'ace': try:
# Make sure we are able to display ZMI when preference tool / catalog does
# not work.
editor = portal.portal_preferences.getPreference('preferred_source_code_editor')
except ConflictError:
raise
except:
editor = None
if editor != 'ace':
return default return default
# REQUEST['PUBLISHED'] can be the form in the acquisition context of the # REQUEST['PUBLISHED'] can be the form in the acquisition context of the
......
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