From fa450a37a36a4868cd0d245b0f2a1fa15d6e4ea0 Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Tue, 2 Jun 2026 09:41:39 +0000 Subject: [PATCH] =?UTF-8?q?Other=20files=20persisted=20to=20DB=20with=20fi?= =?UTF-8?q?le=5Ftype=20OTHER=20=F0=9F=9F=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/pashub_fetcher/pashub_service.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/backend/pashub_fetcher/pashub_service.py b/backend/pashub_fetcher/pashub_service.py index 3465a46e..305c7252 100644 --- a/backend/pashub_fetcher/pashub_service.py +++ b/backend/pashub_fetcher/pashub_service.py @@ -104,7 +104,11 @@ class PashubService: if downloaded.other: self._upload_to_s3_and_update_db( - downloaded.other, uprn, hubspot_deal_id, file_source + downloaded.other, + uprn, + hubspot_deal_id, + file_source, + default_file_type=FileTypeEnum.OTHER.value, ) # SharePoint upload disabled: pashub sharepoint_link is inconsistent @@ -126,6 +130,7 @@ class PashubService: uprn: Optional[str], hubspot_deal_id: Optional[str], file_source: FileSourceEnum, + default_file_type: Optional[str] = None, ) -> List[_FileUploadRecord]: if not uprn and not hubspot_deal_id: return [] @@ -152,7 +157,7 @@ class PashubService: uprn=int(uprn) if uprn else None, hubspot_deal_id=hubspot_deal_id, file_source=file_source.value, - file_type=get_file_type_string(filename), + file_type=get_file_type_string(filename) or default_file_type, ) file_paths.append(file_path) uploaded_files.append(uploaded_file)