fix useless fallback at end of pairing
This commit is contained in:
parent
a3144dc3c9
commit
ae6c033bbe
1 changed files with 2 additions and 1 deletions
|
|
@ -329,12 +329,13 @@ class Pairing:
|
||||||
round: Round,
|
round: Round,
|
||||||
remaining: List[str],
|
remaining: List[str],
|
||||||
) -> None:
|
) -> None:
|
||||||
|
if not remaining:
|
||||||
|
return
|
||||||
campaign = war.get_campaign_by_round(round.id)
|
campaign = war.get_campaign_by_round(round.id)
|
||||||
if campaign is None:
|
if campaign is None:
|
||||||
raise DomainError("Campaign not found")
|
raise DomainError("Campaign not found")
|
||||||
match_counts = Pairing.build_match_count(campaign)
|
match_counts = Pairing.build_match_count(campaign)
|
||||||
available_battles = round.get_battles_with_places()
|
available_battles = round.get_battles_with_places()
|
||||||
# FIXME no error when all participants allocated
|
|
||||||
if not available_battles:
|
if not available_battles:
|
||||||
raise DomainError("No available battle remaining")
|
raise DomainError("No available battle remaining")
|
||||||
occupancy = {
|
occupancy = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue