Commit 8e6e35df authored by Ioannis Papagiannopoulos's avatar Ioannis Papagiannopoulos Committed by Georgios Dagkakis

findActiveEntities correction

parent b57c7adc
......@@ -87,8 +87,12 @@ class Order(Job):
# if the component is not yet created then there is no entity to find.
component=findObjectById(componentId)
if component:
if not component in self.components:
# if the component is not in the components list and has a currentStation add it
if not component in self.components and component.currentStation:
self.components.append(component)
# if the component is in the components list and has no currentStation remove it
if component in self.components and not component.currentStation:
self.components.remove(component)
#===========================================================================
# return the all the active child components of the order
......
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