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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Georgios Dagkakis
erp5
Commits
932d1d1d
Commit
932d1d1d
authored
May 24, 2019
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5.Tool.CategoryTool, Folder: Do not copy over special and ClassSecurityInfo attributes.
parent
cfd807ca
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
product/ERP5/Tool/CategoryTool.py
product/ERP5/Tool/CategoryTool.py
+3
-1
product/ERP5Type/Core/Folder.py
product/ERP5Type/Core/Folder.py
+3
-1
No files found.
product/ERP5/Tool/CategoryTool.py
View file @
932d1d1d
...
@@ -158,12 +158,14 @@ class CategoryTool(CMFCategoryTool, BaseTool):
...
@@ -158,12 +158,14 @@ class CategoryTool(CMFCategoryTool, BaseTool):
# inherits from via BaseTool) and CMFCategoryTool in favour of the property
# inherits from via BaseTool) and CMFCategoryTool in favour of the property
# from BaseTool (so it may override CopyContainer).
# from BaseTool (so it may override CopyContainer).
for
CopyContainer_property_id
in
CopyContainer
.
__dict__
:
for
CopyContainer_property_id
in
CopyContainer
.
__dict__
:
if
CopyContainer_property_id
in
CategoryTool
.
__dict__
:
if
CopyContainer_property_id
.
startswith
(
'__'
)
or
CopyContainer_property_id
in
CategoryTool
.
__dict__
:
continue
continue
try
:
try
:
BaseTool_property
=
getattr
(
BaseTool
,
CopyContainer_property_id
)
BaseTool_property
=
getattr
(
BaseTool
,
CopyContainer_property_id
)
except
AttributeError
:
except
AttributeError
:
continue
continue
if
isinstance
(
BaseTool_property
,
ClassSecurityInfo
):
continue
setattr
(
CategoryTool
,
CopyContainer_property_id
,
BaseTool_property
)
setattr
(
CategoryTool
,
CopyContainer_property_id
,
BaseTool_property
)
InitializeClass
(
CategoryTool
)
InitializeClass
(
CategoryTool
)
product/ERP5Type/Core/Folder.py
View file @
932d1d1d
...
@@ -1720,10 +1720,12 @@ for source_klass, destination_klass in \
...
@@ -1720,10 +1720,12 @@ for source_klass, destination_klass in \
# inherits from via Base) and those bases in favour of the property
# inherits from via Base) and those bases in favour of the property
# from Base (so it may override CopyContainer).
# from Base (so it may override CopyContainer).
for
CopyContainer_property_id
in
CopyContainer
.
__dict__
:
for
CopyContainer_property_id
in
CopyContainer
.
__dict__
:
if
CopyContainer_property_id
in
Folder
.
__dict__
:
if
CopyContainer_property_id
.
startswith
(
'__'
)
or
CopyContainer_property_id
in
Folder
.
__dict__
:
continue
continue
try
:
try
:
Base_property
=
getattr
(
Base
,
CopyContainer_property_id
)
Base_property
=
getattr
(
Base
,
CopyContainer_property_id
)
except
AttributeError
:
except
AttributeError
:
continue
continue
if
isinstance
(
Base_property
,
ClassSecurityInfo
):
continue
setattr
(
Folder
,
CopyContainer_property_id
,
Base_property
)
setattr
(
Folder
,
CopyContainer_property_id
,
Base_property
)
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