Commit 21829be8 authored by Jérome Perrin's avatar Jérome Perrin

configurator: Fix some minor errors in BusinessProcessConfiguratorItem

This code was iterating in a dict and removing keys at the same time.

The second block was the same logic as the first, but using another variable
all along, except for the part where None keys are removed from dict. Change
this part to use the other variable used everywhere else in the second block.
parent 9964b8ae
......@@ -81,7 +81,7 @@ class BusinessProcessConfiguratorItem(ConfiguratorItemMixin, XMLObject):
title = path_dict.pop('title')
trade_phase = path_dict.pop('trade_phase')
trade_date = path_dict.pop('trade_date')
for key in path_dict:
for key in list(path_dict):
if path_dict[key] is None:
path_dict.pop(key)
self._addTradeModelPath(business_process=business_process,
......@@ -99,9 +99,9 @@ class BusinessProcessConfiguratorItem(ConfiguratorItemMixin, XMLObject):
delivery_builder = link_dict.pop('delivery_builder', None)
predecessor = link_dict.pop('predecessor', None)
successor = link_dict.pop('successor', None)
for key in path_dict:
if path_dict[key] is None:
path_dict.pop(key)
for key in list(link_dict):
if link_dict[key] is None:
link_dict.pop(key)
self._addBusinessLink(business_process=business_process,
title=title,
......
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