Skip to content

Commit

Permalink
Fix forgotten refactors
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackYps committed Jun 4, 2024
1 parent 4e94706 commit 12d5902
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions service/league_service/league_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ async def update_data(self):

self._leagues_by_rating_type = defaultdict(list)
for league_name, division_list in divisions_by_league.items():
rating_type = division_list[0][leaderboard.c.technical_name]
placement_games = division_list[0][league_season.c.placement_games]
placement_games_returning_player = division_list[0][league_season.c.placement_games_returning_player]
rating_type = division_list[0].technical_name
placement_games = division_list[0].placement_games
placement_games_returning_player = division_list[0].placement_games_returning_player
division_list.sort(
key=lambda row: (
row.division_index,
Expand Down
4 changes: 2 additions & 2 deletions tests/unit_tests/test_season_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async def test_generate_season(season_generator, database):
await season_generator.generate_season()
async with database.acquire() as conn:
seasons = await conn.execute(select(league_season))
rows = await seasons.fetchall()
rows = seasons.fetchall()
assert len(rows) == 6
assert max(row.season_number for row in rows) == 4

Expand Down Expand Up @@ -77,6 +77,6 @@ async def test_generate_season_only_once(season_generator, database):
await season_generator.check_season_end()
async with database.acquire() as conn:
seasons = await conn.execute(select(league_season))
rows = await seasons.fetchall()
rows = seasons.fetchall()
assert len(rows) == 6
assert max(row.season_number for row in rows) == 4

0 comments on commit 12d5902

Please sign in to comment.