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
0ac23f1c
Commit
0ac23f1c
authored
Jan 22, 2013
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CategoryTool: remove broken/unused getRelatedValueList parameters
parent
9b022399
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
15 deletions
+3
-15
product/CMFCategory/CategoryTool.py
product/CMFCategory/CategoryTool.py
+3
-15
No files found.
product/CMFCategory/CategoryTool.py
View file @
0ac23f1c
...
...
@@ -1278,7 +1278,6 @@ class CategoryTool( UniqueObject, Folder, Base ):
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getRelatedValueList'
)
def
getRelatedValueList
(
self
,
context
,
base_category_list
=
None
,
spec
=
(),
filter
=
None
,
base
=
1
,
checked_permission
=
None
,
**
kw
):
"""
This methods returns the list of objects related to the context
...
...
@@ -1289,9 +1288,6 @@ class CategoryTool( UniqueObject, Folder, Base ):
if
isinstance
(
portal_type
,
str
):
portal_type
=
[
portal_type
]
if
spec
is
():
# We do not want to care about spec
spec
=
None
# Base Category may not be related, besides sub categories
if
context
.
getPortalType
()
==
'Base Category'
:
...
...
@@ -1305,16 +1301,10 @@ class CategoryTool( UniqueObject, Folder, Base ):
for
base_category
in
base_category_list
:
category_list
.
append
(
"%s/%s"
%
(
base_category
,
context
.
getRelativeUrl
()))
sql_kw
=
{}
for
sql_key
in
(
'limit'
,
'order_by_expression'
):
# XXX-JPS it would be better to use Catalog API
if
sql_key
in
kw
:
sql_kw
[
sql_key
]
=
kw
[
sql_key
]
brain_result
=
self
.
Base_zSearchRelatedObjectsByCategoryList
(
category_list
=
category_list
,
portal_type
=
portal_type
,
strict_membership
=
strict_membership
,
**
sql_kw
)
strict_membership
=
strict_membership
)
result
=
[]
if
checked_permission
is
None
:
...
...
@@ -1345,8 +1335,7 @@ class CategoryTool( UniqueObject, Folder, Base ):
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getRelatedPropertyList'
)
def
getRelatedPropertyList
(
self
,
context
,
base_category_list
=
None
,
property_name
=
None
,
spec
=
(),
filter
=
None
,
base
=
1
,
property_name
=
None
,
checked_permission
=
None
,
**
kw
):
"""
This methods returns the list of property_name on objects
...
...
@@ -1355,8 +1344,7 @@ class CategoryTool( UniqueObject, Folder, Base ):
result
=
[]
for
o
in
self
.
getRelatedValueList
(
context
=
context
,
base_category_list
=
base_category_list
,
spec
=
spec
,
filter
=
filter
,
base
=
base
,
base_category_list
=
base_category_list
,
checked_permission
=
checked_permission
,
**
kw
):
result
.
append
(
o
.
getProperty
(
property_name
,
None
))
return
result
...
...
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