From 9a1e98db961eaceab8e4f8e1e4af7f30d97b2929 Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Mon, 1 Jul 2024 14:35:14 -0500 Subject: [PATCH] Triples bug fix --- batters/calcs_batter.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/batters/calcs_batter.py b/batters/calcs_batter.py index 5e67959..136552b 100644 --- a/batters/calcs_batter.py +++ b/batters/calcs_batter.py @@ -118,8 +118,9 @@ class BattingCardRatingsModel(pydantic.BaseModel): self.rem_xbh -= Decimal(self.bp_homerun + self.homerun) if szn_triples > 0 and self.rem_xbh > 0: - self.triple = sanitize_chance_output(self.rem_xbh, min_chances=0.5) - if self.rem_xbh > 0: + logging.error(f'Adding {self.rem_xbh} results to triples') + self.triple += sanitize_chance_output(self.rem_xbh, min_chances=0.5) + elif self.rem_xbh > 0: logging.error(f'Adding {self.rem_xbh} results to all other ob') # print(self) self.all_other_ob += self.rem_xbh