Bug fix: pitchers auto-fatigue one out too late
This commit is contained in:
parent
a416e90db9
commit
36fd848b62
@ -607,7 +607,7 @@ def complete_play(session:Session, this_play: Play):
|
|||||||
new_pitcher = get_one_lineup(session, this_play.game, new_pitcher_team, position='P')
|
new_pitcher = get_one_lineup(session, this_play.game, new_pitcher_team, position='P')
|
||||||
logger.info(f'Check for {new_pitcher.player.name} POW')
|
logger.info(f'Check for {new_pitcher.player.name} POW')
|
||||||
outs = session.exec(select(func.sum(Play.outs)).where(
|
outs = session.exec(select(func.sum(Play.outs)).where(
|
||||||
Play.game == this_play.game, Play.pitcher == new_pitcher, Play.complete == True
|
Play.game == this_play.game, Play.pitcher == new_pitcher
|
||||||
)).one()
|
)).one()
|
||||||
if outs is None:
|
if outs is None:
|
||||||
outs = 0
|
outs = 0
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user