Skip to content

Commit

Permalink
Merge pull request #15 from SwimResults/develop
Browse files Browse the repository at this point in the history
fix broken livetiming with unusual event number order
  • Loading branch information
konrad2002 authored Apr 12, 2024
2 parents b805521 + 8ddbfba commit 4ab70ce
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions service/event_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,14 @@ func GetEventByMeetingAndNumberForLivetiming(id string, number int) (dto.EventLi
found = true
break
}
if events[i].Number > number {
eventLivetiming.NextEvent = events[i]
if i > 0 {
eventLivetiming.PrevEvent = events[i-1]
}
found = true
break
}
//if events[i].Number > number {
// eventLivetiming.NextEvent = events[i]
// if i > 0 {
// eventLivetiming.PrevEvent = events[i-1]
// }
// found = true
// break
//}
}

if !found {
Expand Down

0 comments on commit 4ab70ce

Please sign in to comment.