Commit a68a2fca authored by Vincent Pelletier's avatar Vincent Pelletier

Cleanup property_sheet_generating_portal_type_set

Whatever the reason we exit this code, we are not generating this portal
type anymore. So remove it from set.
parent 27d57647
......@@ -204,21 +204,21 @@ def generatePortalTypeClass(site, portal_type_name):
# "Filling accessor holder list for portal_type " + portal_type_name)
property_sheet_generating_portal_type_set.add(portal_type_name)
# Initialize ZODB Property Sheets accessor holders
accessor_holder_list = createAllAccessorHolderList(site,
portal_type_name,
portal_type,
klass)
base_category_set = set(attribute_dict['_categories'])
for accessor_holder in accessor_holder_list:
base_category_set.update(accessor_holder._categories)
attribute_dict['constraints'].extend(accessor_holder.constraints)
attribute_dict['_categories'] = list(base_category_set)
property_sheet_generating_portal_type_set.remove(portal_type_name)
try:
# Initialize ZODB Property Sheets accessor holders
accessor_holder_list = createAllAccessorHolderList(site,
portal_type_name,
portal_type,
klass)
base_category_set = set(attribute_dict['_categories'])
for accessor_holder in accessor_holder_list:
base_category_set.update(accessor_holder._categories)
attribute_dict['constraints'].extend(accessor_holder.constraints)
attribute_dict['_categories'] = list(base_category_set)
finally:
property_sheet_generating_portal_type_set.remove(portal_type_name)
# LOG("ERP5Type.dynamic", INFO,
# "Filled accessor holder list for portal_type %s (%s)" % \
......
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