Commit 96c7b23d authored by Arnaud Fontaine's avatar Arnaud Fontaine

When adding a new category in a ZODB Property Sheet, the reference has

not been filled yet, thus re-generated accessors could have failed



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43206 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 29bd7094
......@@ -221,9 +221,19 @@ class PropertySheetTool(BaseTool):
categories = []
for property in property_sheet.contentValues():
portal_type = property.getPortalType()
property_definition = property.exportToFilesystemDefinition()
# If a category doesn't have a name yet or the constraint class
# returned is None, then just skip it
if property_definition is None:
LOG("Tool.PropertySheetTool", INFO,
"Skipping property with ID '%s' in Property Sheet '%s'" % \
(property.getId(), property_sheet.getId()))
continue
portal_type = property.getPortalType()
if portal_type == "Category Property" or \
portal_type == "Dynamic Category Property":
categories.append(property_definition)
......
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