fix(normalizer): don't coerce boolean cells to 1/0

Add bool guard before the int branch in _cell_to_str so True/False
cells are preserved as "True"/"False" instead of "1"/"0". Add two
regression tests covering the fix and missing-sheet error.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-05-25 14:11:19 +02:00
parent 74c4c390fc
commit 75b3ca8b9e
2 changed files with 12 additions and 0 deletions

View File

@@ -7,6 +7,8 @@ import openpyxl
def _cell_to_str(value) -> str:
if value is None:
return ""
if isinstance(value, bool): # bool is a subclass of int — handle before the int branch
return str(value)
if isinstance(value, datetime.datetime):
return value.date().isoformat()
if isinstance(value, datetime.date):