Commit 0ab41cd1 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki Committed by Boxiang Sun

erp5_pdm: respect existing predicate in TransformationOptionalResource_asPredicate.

parent 82ec6d1c
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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment