summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Klichowicz <emkael@tlen.pl>2023-10-05 22:50:36 +0200
committerMichał Klichowicz <emkael@tlen.pl>2023-10-05 22:50:36 +0200
commitd13ffeac444f142e1c5869d58adac8fc819d7151 (patch)
tree4eb4f89590bb2398fe2af685e5614f599fc0a62d
parentb84d880f5e4c0a0395630b24a42980758d912024 (diff)
Safety check for empty team rosters
-rw-r--r--src/main.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.py b/src/main.py
index c4784e7..7eb2319 100644
--- a/src/main.py
+++ b/src/main.py
@@ -102,8 +102,8 @@ def fetch_lineups(pbn, db, settings):
continue
home_team = round_lineup[table][0]
away_team = round_lineup[table][1]
- home_roster = rosters[home_team]
- away_roster = rosters[away_team]
+ home_roster = rosters.get(home_team, {})
+ away_roster = rosters.get(away_team, {})
lineups = {}
positions = [['N', 'S'], ['E', 'W']]
for room, lineup in rooms.items():