From c86dbeb4a1060462cfe5c2059cf84e79fe5e28b6 Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Tue, 2 Jun 2026 09:37:17 +0000 Subject: [PATCH] =?UTF-8?q?Upload=20other=20files=20to=20S3=20when=20get?= =?UTF-8?q?=5Fother=5Ffiles=20is=20True=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 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/backend/pashub_fetcher/pashub_service.py b/backend/pashub_fetcher/pashub_service.py index a54036a8..3465a46e 100644 --- a/backend/pashub_fetcher/pashub_service.py +++ b/backend/pashub_fetcher/pashub_service.py @@ -102,14 +102,16 @@ class PashubService: ) self._save_site_notes(upload_records) + if downloaded.other: + self._upload_to_s3_and_update_db( + downloaded.other, uprn, hubspot_deal_id, file_source + ) + # SharePoint upload disabled: pashub sharepoint_link is inconsistent # (points to property or project unpredictably) # if request.sharepoint_link: # self._upload_to_sharepoint(request.sharepoint_link, downloaded.core) - if request.get_other_files: - pass # TODO: process downloaded.other - for file_path in downloaded.core + downloaded.other: try: os.remove(file_path)