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
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
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Paul Graydon
erp5
Commits
8edd8f38
Commit
8edd8f38
authored
Jun 14, 2013
by
Aurel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
spec must be a tuple otherwise retrieval from cache fail as a list is not hashable
parent
0191a23e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
product/CMFCategory/CategoryTool.py
product/CMFCategory/CategoryTool.py
+10
-4
No files found.
product/CMFCategory/CategoryTool.py
View file @
8edd8f38
...
...
@@ -585,8 +585,10 @@ class CategoryTool( UniqueObject, Folder, Base ):
category_list
=
[
base_category
]
else
:
category_list
=
base_category
if
not
isinstance
(
spec
,
(
tuple
,
list
)):
spec
=
[
spec
]
if
isinstance
(
spec
,
str
):
spec
=
(
spec
,)
elif
isinstance
(
spec
,
list
):
spec
=
tuple
(
spec
)
spec_len
=
len
(
spec
)
for
path
in
self
.
_getCategoryList
(
context
):
# LOG('getCategoryMembershipList',0,str(path))
...
...
@@ -815,7 +817,9 @@ class CategoryTool( UniqueObject, Folder, Base ):
append
=
result
.
append
# Make sure spec is a list or tuple
if
isinstance
(
spec
,
str
):
spec
=
[
spec
]
spec
=
(
spec
,)
elif
isinstance
(
spec
,
list
):
spec
=
tuple
(
spec
)
spec_len
=
len
(
spec
)
# Filter categories
if
getattr
(
aq_base
(
context
),
'categories'
,
_marker
)
is
not
_marker
:
...
...
@@ -930,7 +934,9 @@ class CategoryTool( UniqueObject, Folder, Base ):
if
spec
is
():
spec
=
portal_type
# This is bad XXX - JPS - spec is for meta_type, not for portal_type - be consistent !
if
isinstance
(
spec
,
str
):
spec
=
[
spec
]
spec
=
(
spec
,)
elif
isinstance
(
spec
,
list
):
spec
=
tuple
(
spec
)
if
isinstance
(
acquired_portal_type
,
str
):
acquired_portal_type
=
[
acquired_portal_type
]
...
...
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