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
1 changed files with 3 additions and 0 deletions

View File

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