Skip to content

Commit

Permalink
Start: Do not abort on category without course
Browse files Browse the repository at this point in the history
  • Loading branch information
bodograumann committed Apr 5, 2024
1 parent 60767c6 commit ca37e36
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions holper/start.py
Expand Up @@ -14,6 +14,7 @@
.. _WKB: https://o-sport.de/dokumente/wettkampfwesen/
"""

import logging
import operator
import random
from collections import Counter, defaultdict
Expand Down Expand Up @@ -75,6 +76,9 @@ def __init__(

def add_race_courses(self, race: Race) -> None:
for category in race.categories:
if not category.courses:
logging.error("Category %s has no course assigned!", category.name)
continue
self.order[category.courses[0].course.course_id].append(category)

for categories in self.order.values():
Expand Down

0 comments on commit ca37e36

Please sign in to comment.