Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5_fork
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eteri
erp5_fork
Commits
36cbf7bd
Commit
36cbf7bd
authored
Dec 03, 2020
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TrashTool: avoid unnecessary function parameter expansion
parent
39d735e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
product/ERP5/Tool/TrashTool.py
product/ERP5/Tool/TrashTool.py
+3
-3
No files found.
product/ERP5/Tool/TrashTool.py
View file @
36cbf7bd
...
@@ -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_sub
objects
:
# export subobjects
# export subobjects
if
save
:
if
save
:
obj
=
backup_object_container
.
_getOb
(
object_id
,
None
)
obj
=
backup_object_container
.
_getOb
(
object_id
,
None
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment