Add 'UK' operator (Unknown) in case of mussing operator

This commit is contained in:
Fred Boniface 2023-07-27 20:58:07 +01:00
parent 06f59fcfea
commit 0f9a99edfd

View File

@ -49,6 +49,9 @@ func formatData(dataInput *upstreamApi.Schedule) database.Service {
planSpeed = parseSpeed(dataInput.ScheduleSegment[0].CIFSpeed) planSpeed = parseSpeed(dataInput.ScheduleSegment[0].CIFSpeed)
stops = parseStops(dataInput.ScheduleSegment[0].ScheduleLocation) stops = parseStops(dataInput.ScheduleSegment[0].ScheduleLocation)
} }
if operator == "" {
operator = "UK"
}
service := database.Service{ service := database.Service{
TransactionType: dataInput.TransactionType, TransactionType: dataInput.TransactionType,
StpIndicator: dataInput.CIFSTPIndicator, StpIndicator: dataInput.CIFSTPIndicator,