Commit 46a45c46 authored by Ioannis Papagiannopoulos's avatar Ioannis Papagiannopoulos Committed by Georgios Dagkakis

findActiveEntities correction

parent 0945be9e
...@@ -87,8 +87,12 @@ class Order(Job): ...@@ -87,8 +87,12 @@ class Order(Job):
# if the component is not yet created then there is no entity to find. # if the component is not yet created then there is no entity to find.
component=findObjectById(componentId) component=findObjectById(componentId)
if component: 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) 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 # 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