Manage trip additions and cancels

This commit is contained in:
2024-02-06 08:01:56 +01:00
parent 9ed97df4b5
commit 8d2ffe3014
7 changed files with 247 additions and 149 deletions

View File

@ -265,7 +265,7 @@ class Command(BaseCommand):
dep_time = stop_time_dict['departure_time']
dep_time = int(dep_time[:2]) * 3600 + int(dep_time[3:5]) * 60 + int(dep_time[6:])
st = StopTime(
id=f"{stop_time_dict['trip_id']}-{stop_time_dict['stop_sequence']}",
id=f"{stop_time_dict['trip_id']}-{stop_time_dict['stop_id']}",
trip_id=stop_time_dict['trip_id'],
arrival_time=timedelta(seconds=arr_time),
departure_time=timedelta(seconds=dep_time),