Skip to content

Commit

Permalink
fixup! fixup! fixup! Swiss scheduling improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
evroon committed Nov 21, 2024
1 parent abe8c05 commit b07c2f2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions backend/bracket/logic/scheduling/ladder_teams.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
SuggestedMatch,
get_match_hash,
)
from bracket.models.db.stage_item_inputs import StageItemInput
from bracket.models.db.stage_item_inputs import StageItemInput, StageItemInputFinal
from bracket.models.db.util import RoundWithMatches
from bracket.utils.id_types import StageItemInputId
from bracket.utils.types import assert_some
Expand Down Expand Up @@ -65,7 +65,10 @@ def get_possible_upcoming_matches_for_swiss(
draft_round_input_ids = get_draft_round_input_ids(draft_round) if draft_round else frozenset()

inputs_to_schedule = [
input_ for input_ in stage_item_inputs if input_.id not in draft_round_input_ids
input_
for input_ in stage_item_inputs
if input_.id not in draft_round_input_ids
and (not isinstance(input_, StageItemInputFinal) or input_.team.active)
]

if len(inputs_to_schedule) < 1:
Expand Down

0 comments on commit b07c2f2

Please sign in to comment.