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