Skip to content

Commit

Permalink
Ensure service
Browse files Browse the repository at this point in the history
  • Loading branch information
DerekEdwards committed Sep 12, 2017
1 parent 65fbc30 commit 008d099
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/serializers/api/v1/itinerary_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def augmented_legs
object.legs.each do |leg|
if leg['agencyId']
service = Service.find_by(gtfs_agency_id: leg['agencyId'])
if service.fare_structure == "url"
if service and service.fare_structure == "url"
leg["serviceFareInfo"] = service.fare_details[:url]
end
end
Expand Down

0 comments on commit 008d099

Please sign in to comment.