Skip to content

Commit

Permalink
get gtfs_agency_id from v2 when available
Browse files Browse the repository at this point in the history
  • Loading branch information
drewda committed Feb 18, 2022
1 parent 353ce3c commit 6bf8291
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/serializers/operator_in_feed_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ class OperatorInFeedSerializer < ApplicationSerializer
:feed_onestop_id,
:operator_url,
:feed_url

def gtfs_agency_id
object.gtfs_agency_id || object.try(:resolved_gtfs_agency_id)
end


def operator_onestop_id
object.operator.try(:onestop_id) || object.try(:resolved_onestop_id)
Expand Down

0 comments on commit 6bf8291

Please sign in to comment.