Commit 36cbf7bd authored by Nicolas Wavrant's avatar Nicolas Wavrant

TrashTool: avoid unnecessary function parameter expansion

parent 39d735e4
Pipeline #12625 failed with stage
in 0 seconds
...@@ -56,9 +56,10 @@ class TrashTool(BaseTool): ...@@ -56,9 +56,10 @@ class TrashTool(BaseTool):
manage_overview = DTMLFile( 'explainTrashTool', _dtmldir ) manage_overview = DTMLFile( 'explainTrashTool', _dtmldir )
security.declarePrivate('backupObject') security.declarePrivate('backupObject')
def backupObject(self, trashbin, container_path, object_id, save, **kw): def backupObject(self, trashbin, container_path, object_id, save, keep_subobjects=False):
""" """
Backup an object in a trash bin Backup an object in a trash bin
""" """
# LOG('Trash : backup object', 0, str((container_path, object_id))) # LOG('Trash : backup object', 0, str((container_path, object_id)))
if save: if save:
...@@ -131,10 +132,9 @@ class TrashTool(BaseTool): ...@@ -131,10 +132,9 @@ class TrashTool(BaseTool):
"Can't backup object %s" % object_path) "Can't backup object %s" % object_path)
return {} return {}
keep_sub = kw.get('keep_subobjects', 0)
subobjects_dict = {} subobjects_dict = {}
if not keep_sub: if not keep_subobjects:
# export subobjects # export subobjects
if save: if save:
obj = backup_object_container._getOb(object_id, None) obj = backup_object_container._getOb(object_id, None)
......
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