tcl: reorder schedules (#79548)
gitea/passerelle/pipeline/head Build queued... Details

This commit is contained in:
Frédéric Péters 2023-07-08 20:20:43 +02:00
parent c38ee2913c
commit ab2f8a847b
1 changed files with 5 additions and 1 deletions

View File

@ -89,7 +89,11 @@ class Tcl(BaseResource):
stop['passings'].sort(key=lambda x: x['heurepassage'])
stop['passings_by_line'] = sorted(
(
{'ligne': v[0]['line_info']['ligne'], 'line_info': v[0]['line_info'], 'passings': v}
{
'ligne': v[0]['line_info']['ligne'],
'line_info': v[0]['line_info'],
'passings': sorted(v, key=lambda x: x['heurepassage']),
}
for k, v in passings_by_line.items()
),
key=lambda x: x['passings'][0]['heurepassage'],