Commit a60c0ef7 authored by Arnaud Fontaine's avatar Arnaud Fontaine

Remove useless transaction.commit()



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43649 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 008cbdd2
......@@ -97,23 +97,22 @@ class PropertySheetTool(BaseTool):
# Get all the filesystem Property Sheets
for name, klass in PropertySheet.__dict__.iteritems():
if name[0] == '_':
continue
elif isinstance(klass, str): # Property Sheet is not available
# If the Property Sheet is a string, it means that the Property
# Sheets has either been already migrated or it is not available
# (perhaps defined in a bt5 not installed yet?)
if name[0] == '_' or isinstance(klass, basestring):
continue
if name in self.objectIds():
if erase_existing:
self.portal_property_sheets.deleteContent(name)
transaction.commit()
else:
if not erase_existing:
continue
self.portal_property_sheets.deleteContent(name)
LOG("Tool.PropertySheetTool", INFO,
"Creating %s in portal_property_sheets" % repr(name))
PropertySheetDocument.importFromFilesystemDefinition(self, klass)
transaction.commit()
if REQUEST is not None:
portal = self.getPortalObject()
......
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