Skip to content

Commit

Permalink
Fix if service ID not found
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenyeargin committed Mar 16, 2024
1 parent 24ede57 commit 0dc9f77
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/tasks/import.rake
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ namespace :import do
@source.each_calendar_date do |row|
date = CalendarDate.new(CalendarDate.hash_from_gtfs(row))
if date.calendar_id.nil?
puts "[ERROR] Calendar ID is nil for #{date.service_id} / #{date.date}"
puts "[ERROR] Calendar ID is nil for #{date.inspect}"
next
end

Expand Down Expand Up @@ -287,7 +287,7 @@ namespace :import do

trip.start_time = stop_times.first.departure_time
trip.end_time = stop_times.last.arrival_time
trip.save!
trip.save! if trip.valid?
end
end

Expand Down

0 comments on commit 0dc9f77

Please sign in to comment.