Commit a5e39523 authored by Aurel's avatar Aurel

if property sheet already exists, do not try to recreate it


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42995 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3d454916
......@@ -187,13 +187,15 @@ class PropertySheetTool(BaseTool):
if name[0] == '_':
continue
if erase_existing and name in self.portal_property_sheets.objectIds():
self.portal_property_sheets.deleteContent(name)
transaction.commit()
if name in self.portal_property_sheets.objectIds():
if erase_existing:
self.portal_property_sheets.deleteContent(name)
transaction.commit()
else:
continue
LOG("Tool.PropertySheetTool", INFO,
"Creating %s in portal_property_sheets" % repr(name))
self.createPropertySheetFromFilesystemClass(klass)
transaction.commit()
......
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