Skip to content

Commit

Permalink
[#469] Avoid squad incomplete errors if no valid replacement found
Browse files Browse the repository at this point in the history
  • Loading branch information
jack89roberts committed Feb 11, 2022
1 parent 55d3d3f commit 711d22f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions airsenal/framework/optimization_transfers.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ def make_optimum_single_transfer(
else:
if verbose:
print("Failed to add {}".format(p_in[0].name))
if not new_squad.is_complete():
if verbose:
print(f"Failed to find a valid replacement for {p_out.player_id}")
continue
total_points = 0.0
for gw in gameweek_range:
if gw == bench_boost_gw:
Expand Down

0 comments on commit 711d22f

Please sign in to comment.