fix(store): drop dead defensive guard in get_claim_detail (FK guarantees batch exists)

This commit is contained in:
Tyler
2026-06-20 09:30:42 -06:00
parent 423415ab64
commit 7d0e76150b
+5 -6
View File
@@ -1086,12 +1086,11 @@ class CycloneStore:
.all()
)
parsed_at = (
row.batch.parsed_at
if row.batch is not None
else None
)
if parsed_at is not None and parsed_at.tzinfo is None:
# Claim.batch_id is FK NOT NULL with ON DELETE CASCADE, so
# ``row.batch`` is always populated in normal flow. Re-attach
# UTC only when SQLite drops the tzinfo on read.
parsed_at = row.batch.parsed_at
if parsed_at.tzinfo is None:
parsed_at = parsed_at.replace(tzinfo=timezone.utc)
detail = to_ui_claim_detail(