Commit ffa8d1de authored by Ioannis Papagiannopoulos's avatar Ioannis Papagiannopoulos Committed by Georgios Dagkakis

responsibleForCurrentStep now returns the operator responsible and not the ID

parent ccd75d77
...@@ -237,13 +237,15 @@ class Job(Entity): # inherits from the Entity c ...@@ -237,13 +237,15 @@ class Job(Entity): # inherits from the Entity c
from Machine import Machine from Machine import Machine
if issubclass(currentStation.__class__, Machine): if issubclass(currentStation.__class__, Machine):
for routeStep in self.route: for routeStep in self.route:
stepResponsible=routeStep.get('operator','not available') stepResponsible=routeStep.get('operator',None)
stepIDs=routeStep.get('stationIdsList',[]) stepIDs=routeStep.get('stationIdsList',[])
if currentStation.id in stepIDs: if currentStation.id in stepIDs:
responsible=stepResponsible responsibleID=stepResponsible
break break
else: else:
responsible=self.remainingRoute[0].get('operator','not available') responsibleID=self.remainingRoute[0].get('operator',None)
from Globals import findObjectById
responsible=findObjectById(responsibleID)
return responsible return responsible
#=========================================================================== #===========================================================================
# method that finds a receiver for a candidate entity # method that finds a receiver for a candidate entity
......
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