diff --git a/lambdas/po/email_processor/handler.py b/lambdas/po/email_processor/handler.py index 58d8fda..9e7a45e 100644 --- a/lambdas/po/email_processor/handler.py +++ b/lambdas/po/email_processor/handler.py @@ -373,6 +373,11 @@ def enrich_parsed(parsed: dict, s3_key: str, email_subject: str): item[field] = Decimal(value.replace(",", "").strip()) except InvalidOperation: pass + elif isinstance(value, (int, float)) and not isinstance(value, bool): + # parse_float=Decimal means floats can't occur on the LLM path, + # but a bare JSON int would slip through as Python int; coerce + # so both paths emit one canonical Decimal type (cross-review FIX). + item[field] = Decimal(str(value)) return parsed