Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
BenBrostoff committed Dec 27, 2023
1 parent 7371173 commit 54078d6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion draftfast/optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,8 @@ def _set_min_teams(self):
# Ex given min matchups of two, there will always be two teams,
# so adding this constraint is needless if data is good.
# That said, keep constraint to spot check data.
self.solver.Add(self.solver.Sum(teams) >= self.min_teams)
if len(teams) > 0:
self.solver.Add(self.solver.Sum(teams) >= self.min_teams)

def _set_min_matchups(self):
"""
Expand Down

0 comments on commit 54078d6

Please sign in to comment.