Commit eecfbbe1 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki Committed by Kazuhiko Shiozaki

erp5_pdm: respect existing predicate in TransformationOptionalResource_asPredicate.

parent 4311db51
option_category = context.getOptionList() membership_criterion_category_list = context.getMembershipCriterionCategoryList()
option_base_category = [] membership_criterion_base_category_list = context.getMembershipCriterionBaseCategoryList()
if len(option_category) > 0:
option_base_category = [option_category[0].split('/')[0]] for option in context.getOptionList():
membership_criterion_category_list.append(option)
membership_criterion_base_category_list.append(option.split('/')[0])
new_context = context.asContext( new_context = context.asContext(
membership_criterion_category=option_category, membership_criterion_category=tuple(set(membership_criterion_category_list)),
membership_criterion_base_category=option_base_category) membership_criterion_base_category=tuple(set(membership_criterion_base_category_list)))
return new_context 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