Fetch all uploaded files for a set of properties by landlord_property_id 🟩

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Khalim Conn-Kowlessar 2026-07-08 09:23:47 +00:00
parent 910f7cc06c
commit 135dd9abda

View file

@ -31,7 +31,10 @@ class UploadedFilePostgresRepository:
`landlord_property_id` (ADR-0060), across all Document Types. Returns
the raw rows latest-per-Document-Type selection and null-type
skipping are the Download Package plan's job, not the query's."""
raise NotImplementedError
stmt = select(UploadedFile).where(
col(UploadedFile.landlord_property_id).in_(list(landlord_property_ids))
)
return list(self._session.execute(stmt).scalars().all()) # pyright: ignore[reportDeprecated]
def insert(self, uploaded_file: UploadedFile) -> None:
self._session.add(uploaded_file)