Commit 88914df4 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Use set instead of dict for readability.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38212 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent aeb8cc8b
......@@ -543,13 +543,10 @@ class OrderBuilder(XMLObject, Amount, Predicate):
return
# Update variation category list on line
variation_category_dict = dict([(variation_category, True) for
variation_category in
delivery_line.getVariationCategoryList()])
variation_category_set = set(delivery_line.getVariationCategoryList())
for movement in movement_group_node.getMovementList():
for category in movement.getVariationCategoryList():
variation_category_dict[category] = True
variation_category_list = sorted(variation_category_dict.keys())
variation_category_set.update(movement.getVariationCategoryList())
variation_category_list = sorted(variation_category_set)
delivery_line.setVariationCategoryList(variation_category_list)
# Then, create delivery movement (delivery cell or complete delivery
# line)
......
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