Commit 1b306f55 authored by Jérome Perrin's avatar Jérome Perrin

do not fail if Preference type info is not registred in types tool.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@9599 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8d28a4f5
...@@ -49,8 +49,11 @@ def createPreferenceMethods(portal) : ...@@ -49,8 +49,11 @@ def createPreferenceMethods(portal) :
This method must be called on startup. This method must be called on startup.
""" """
attr_list = [] attr_list = []
pref_portal_type = getToolByName(portal, typestool = getToolByName(portal, 'portal_types')
'portal_types')['Preference'] pref_portal_type = typestool.getTypeInfo('Preference')
if pref_portal_type is None:
LOG('createPreferenceMethods', PROBLEM,
'Preference type information is not installed.')
# 'Dynamic' property sheets added through ZMI # 'Dynamic' property sheets added through ZMI
zmi_property_sheet_list = [] zmi_property_sheet_list = []
for property_sheet in pref_portal_type.property_sheet_list : for property_sheet in pref_portal_type.property_sheet_list :
......
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