mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
Audit generator populates XLSX, uploads to S3, and records UploadedFile row 🟪
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
612d522b35
commit
82156fac8f
3 changed files with 4 additions and 5 deletions
|
|
@ -0,0 +1 @@
|
|||
openpyxl
|
||||
|
|
@ -4,7 +4,7 @@ from collections.abc import Callable
|
|||
from datetime import datetime, timezone
|
||||
from io import BytesIO
|
||||
from pathlib import Path
|
||||
from typing import TYPE_CHECKING, Any, Optional
|
||||
from typing import TYPE_CHECKING, Any, cast
|
||||
|
||||
import openpyxl
|
||||
|
||||
|
|
@ -103,7 +103,7 @@ class AuditGeneratorOrchestrator:
|
|||
f"No MagicPlan JSON has been uploaded for deal {self._hubspot_deal_id!r}"
|
||||
)
|
||||
|
||||
plan = uow.magic_plan.get_plan_by_uploaded_file_id(uploaded_file.id)
|
||||
plan = uow.magic_plan.get_plan_by_uploaded_file_id(cast(int, uploaded_file.id))
|
||||
if plan is None:
|
||||
raise ValueError(
|
||||
f"MagicPlan JSON exists for deal {self._hubspot_deal_id!r} "
|
||||
|
|
|
|||
|
|
@ -29,9 +29,7 @@ import infrastructure.postgres.uploaded_file_table as _uf_table # pyright: igno
|
|||
# pg_ctl ships under a versioned path and is not on PATH in the dev container.
|
||||
_PG_CTL = next(iter(sorted(glob.glob("/usr/lib/postgresql/*/bin/pg_ctl"))), "pg_ctl")
|
||||
|
||||
postgresql_proc = factories.postgresql_proc(
|
||||
executable=_PG_CTL
|
||||
) # pyright: ignore[reportUnknownMemberType]
|
||||
postgresql_proc = factories.postgresql_proc(executable=_PG_CTL) # pyright: ignore[reportUnknownMemberType, reportUnknownVariableType]
|
||||
postgresql = factories.postgresql("postgresql_proc")
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue