Commit ff11daa5 authored by Ioannis Papagiannopoulos's avatar Ioannis Papagiannopoulos Committed by Jérome Perrin

operator method outputResultsJSON now returns the completion times together...

operator method outputResultsJSON now returns the completion times together with the start times (schedule)
parent d564f454
......@@ -336,7 +336,17 @@ class Operator(ObjectResource):
if self.schedule:
json['results']['schedule']=[]
for record in self.schedule:
json['results']['schedule'].append({'stationId':record[0].id,'entranceTime':record[1]})
print record
print "the length of the operator schedule is ", len(record)
if len(record)==3:
json['results']['schedule'].append({
'stationId':record[0].id,
'entranceTime':record[1],
'exitTime':record[2]})
else:
json['results']['schedule'].append({
'stationId':record[0].id,
'entranceTime':record[1]})
G.outputJSON['elementList'].append(json)
#===========================================================================
......
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