diff --git a/MuoVErsi/sources/base.py b/MuoVErsi/sources/base.py index 0f06397..957f6f6 100644 --- a/MuoVErsi/sources/base.py +++ b/MuoVErsi/sources/base.py @@ -502,8 +502,11 @@ def upload_trip_stop_time_to_postgres(self, stop_time: TripStopTime): stop_time_db = self.session.query(StopTime).filter_by(trip_id=train.id, stop_id=stop_id).first() if stop_time_db: - if stop_time_db.platform != stop_time.platform: + if stop_time_db.platform != stop_time.platform or stop_time_db.sched_arr_dt != stop_time.arr_time or \ + stop_time_db.sched_dep_dt != stop_time.dep_time: stop_time_db.platform = stop_time.platform + stop_time_db.sched_arr_dt = stop_time.arr_time + stop_time_db.sched_dep_dt = stop_time.dep_time self.session.commit() else: new_stop_time = StopTime(trip_id=train.id, stop_id=stop_id, sched_arr_dt=stop_time.arr_time,