Skip to content

Commit

Permalink
TRAN-5069 : Conditional Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Manan committed Jul 6, 2021
1 parent eb8db25 commit 1b7c9b7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gtfs_realtime_translators/translators/njt_bus.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ def __make_trip_updates(cls, data, filtered_stops):
scheduled_datetime = cls.__to_unix_time("{} {}".format(scheduleddeparturedate.title(), scheduleddeparturetime))
scheduled_departure_time = int(scheduled_datetime.timestamp())

arrival_time = int(scheduled_datetime.add(seconds=int(stop['sec_late'])).timestamp())
sec_late = 0
if not stop['sec_late']:
sec_late = int(stop['sec_late'])
arrival_time = int(scheduled_datetime.add(seconds=sec_late).timestamp())

trip_update = TripUpdate.create(entity_id=str(idx + 1),
route_id=route_id,
Expand Down

0 comments on commit 1b7c9b7

Please sign in to comment.