Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
141
Merge Requests
141
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
erp5
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
Pipeline
#12625
failed with stage
in 0 seconds
Changes
1
Pipelines
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):
manage_overview
=
DTMLFile
(
'explainTrashTool'
,
_dtmldir
)
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
"""
# LOG('Trash : backup object', 0, str((container_path, object_id)))
if
save
:
...
...
@@ -131,10 +132,9 @@ class TrashTool(BaseTool):
"Can't backup object %s"
%
object_path
)
return
{}
keep_sub
=
kw
.
get
(
'keep_subobjects'
,
0
)
subobjects_dict
=
{}
if
not
keep_sub
:
if
not
keep_sub
objects
:
# export subobjects
if
save
:
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