Skip to content

Commit ebec877

Browse files
committed
do not import heat 0 in lenex
1 parent 81a0b6d commit ebec877

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

importer/lenex_importer.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,10 @@ func ImportLenexFile(file string, meeting string, exclude []int, include []int,
301301
for _, entry := range athlete.Entries {
302302
heat := heats[entry.HeatId]
303303

304+
if heat.Number == 0 {
305+
continue
306+
}
307+
304308
if !IsEventImportable(heat.Event, exclude, include) {
305309
fmt.Printf("entry of '%s' for event: '%d' => no import\n", newAthlete.Name, heat.Event)
306310
continue
@@ -348,6 +352,10 @@ func ImportLenexFile(file string, meeting string, exclude []int, include []int,
348352
heat := heats[result.HeatId]
349353
rank := ranks[result.ResultId]
350354

355+
if heat.Number == 0 {
356+
continue
357+
}
358+
351359
if !IsEventImportable(heat.Event, exclude, include) {
352360
fmt.Printf("result of '%s' for event: '%d' => no import\n", newAthlete.Name, heat.Event)
353361
continue
@@ -472,7 +480,7 @@ func ImportLenexFile(file string, meeting string, exclude []int, include []int,
472480
fmt.Printf("[ %c ] > id: %s, type: %s, reason: %s\n", cs, disqualification.Identifier, disqualification.Type, disqualification.Reason)
473481
}
474482
}
475-
483+
// only heats with heat number != 0 are imported until here!
476484
}
477485
}
478486
}

0 commit comments

Comments
 (0)