diff --git a/app/routers_v2/decisions.py b/app/routers_v2/decisions.py index 0ae5af1..4966b91 100644 --- a/app/routers_v2/decisions.py +++ b/app/routers_v2/decisions.py @@ -140,7 +140,11 @@ async def get_decisions_for_rest(team_id: int, season: int = None, limit: int = this_line = StratPlay.select( StratPlay.pitcher, StratPlay.game, fn.SUM(StratPlay.outs).alias('sum_outs') ).where((StratPlay.game == x.game) & (StratPlay.pitcher == x.pitcher)) - this_val.append(float(this_line[0].sum_outs // 3) + (float(this_line[0].sum_outs % 3) * .1)) + logging.info(f'this_line: {this_line[0]}') + if this_line[0].sum_outs is None: + this_val.append(0.0) + else: + this_val.append(float(this_line[0].sum_outs // 3) + (float(this_line[0].sum_outs % 3) * .1)) return_dec.append(this_val)