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
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Lu Xu
erp5
Commits
eecfbbe1
Commit
eecfbbe1
authored
Dec 15, 2017
by
Kazuhiko Shiozaki
Committed by
Kazuhiko Shiozaki
Dec 15, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_pdm: respect existing predicate in TransformationOptionalResource_asPredicate.
parent
4311db51
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/TransformationOptionalResource_asPredicate.py
...ns/erp5_pdm/TransformationOptionalResource_asPredicate.py
+8
-6
No files found.
bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/TransformationOptionalResource_asPredicate.py
View file @
eecfbbe1
option_category
=
context
.
getOptionList
()
option_base_category
=
[]
if
len
(
option_category
)
>
0
:
option_base_category
=
[
option_category
[
0
].
split
(
'/'
)[
0
]]
membership_criterion_category_list
=
context
.
getMembershipCriterionCategoryList
()
membership_criterion_base_category_list
=
context
.
getMembershipCriterionBaseCategoryList
()
for
option
in
context
.
getOptionList
():
membership_criterion_category_list
.
append
(
option
)
membership_criterion_base_category_list
.
append
(
option
.
split
(
'/'
)[
0
])
new_context
=
context
.
asContext
(
membership_criterion_category
=
option_category
,
membership_criterion_base_category
=
option_base_category
)
membership_criterion_category
=
tuple
(
set
(
membership_criterion_category_list
))
,
membership_criterion_base_category
=
tuple
(
set
(
membership_criterion_base_category_list
))
)
return
new_context
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