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()
|
.all()
|
||||||
)
|
)
|
||||||
|
|
||||||
parsed_at = (
|
# Claim.batch_id is FK NOT NULL with ON DELETE CASCADE, so
|
||||||
row.batch.parsed_at
|
# ``row.batch`` is always populated in normal flow. Re-attach
|
||||||
if row.batch is not None
|
# UTC only when SQLite drops the tzinfo on read.
|
||||||
else None
|
parsed_at = row.batch.parsed_at
|
||||||
)
|
if parsed_at.tzinfo is None:
|
||||||
if parsed_at is not None and parsed_at.tzinfo is None:
|
|
||||||
parsed_at = parsed_at.replace(tzinfo=timezone.utc)
|
parsed_at = parsed_at.replace(tzinfo=timezone.utc)
|
||||||
|
|
||||||
detail = to_ui_claim_detail(
|
detail = to_ui_claim_detail(
|
||||||
|
|||||||
Reference in New Issue
Block a user