fix(store): drop dead defensive guard in get_claim_detail (FK guarantees batch exists)
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user