fix
This commit is contained in:
@@ -39,8 +39,8 @@ func LoadTripData(path string) (*TripData, error) {
|
||||
})
|
||||
case "routes":
|
||||
err = ParseRoutes(f, func(r types.Route) {
|
||||
tp.Routes[r.RouteID] = &r
|
||||
if ag, ok := tp.Agencies[r.AgencyID]; ok {
|
||||
tp.Routes[r.RouteId] = &r
|
||||
if ag, ok := tp.Agencies[r.AgencyId]; ok {
|
||||
r.SetAgency(ag)
|
||||
// ag.AddRoute(&r)
|
||||
}
|
||||
@@ -58,10 +58,10 @@ func LoadTripData(path string) (*TripData, error) {
|
||||
} else {
|
||||
log.Printf("route %s not found", trip.RouteId)
|
||||
}
|
||||
if agency, ok := tp.Agencies[trip.AgencyID]; ok {
|
||||
if agency, ok := tp.Agencies[trip.AgencyId]; ok {
|
||||
trip.Agency = agency
|
||||
} else {
|
||||
log.Printf("agency %s not found", trip.AgencyID)
|
||||
log.Printf("agency %s not found", trip.AgencyId)
|
||||
}
|
||||
tp.Trips[trip.TripId] = &trip
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user