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

responsibleForCurrentStep now returns the operator responsible and not the ID

parent 161a5d98
......@@ -237,13 +237,15 @@ class Job(Entity): # inherits from the Entity c
from Machine import Machine
if issubclass(currentStation.__class__, Machine):
for routeStep in self.route:
stepResponsible=routeStep.get('operator','not available')
stepResponsible=routeStep.get('operator',None)
stepIDs=routeStep.get('stationIdsList',[])
if currentStation.id in stepIDs:
responsible=stepResponsible
responsibleID=stepResponsible
break
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
#===========================================================================
# 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