Skip to content

Commit 91a85d3

Browse files
authored
Merge pull request #392 from UniversityRadioYork/jp5457
bodge schedule fix
2 parents 17d9320 + c094ddb commit 91a85d3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

models/schedule_tabulate.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -366,12 +366,14 @@ func buildList(schedule []*ScheduleItem, dates []time.Time) []WeekScheduleList {
366366
// it comes from makescheduleslice see the s.fill line. needed otherwise the first show on monday will start at 6am on table view
367367
// or not, theres jukeboxes coming from elsewhere aswell
368368
if len(days[day].Shows) > 0 {
369-
if days[day].Shows[len(days[day].Shows)-1].IsSustainer(){
370-
days[day].Shows = days[day].Shows[:len(days[day].Shows) - 1]
371-
}
372369
if days[day].Shows[0].IsSustainer(){
373370
days[day].Shows = days[day].Shows[1:]
374371
}
372+
if len(days[day].Shows) > 0 {
373+
if days[day].Shows[len(days[day].Shows)-1].IsSustainer(){
374+
days[day].Shows = days[day].Shows[:len(days[day].Shows) - 1]
375+
}
376+
}
375377
}
376378
}
377379
return days

0 commit comments

Comments
 (0)