add image update logging

This commit is contained in:
Daniel Roth 2026-04-09 15:54:33 +00:00
parent a495c930a1
commit 757c224113

View file

@ -10,6 +10,10 @@ from etl.hubspot.s3_uploader import S3Uploader
from backend.app.db.connection import db_read_session
from backend.app.db.models.organisation import Organisation
from etl.hubspot.utils import parse_hs_date
from utils.logger import setup_logger
logger = setup_logger()
class HubspotDataToDb:
@ -272,7 +276,12 @@ class HubspotDataToDb:
return
if fresh_photo_url != existing_deal.major_condition_issue_photos:
logger.info(
f"Hubspot image URL changed from {existing_deal.major_condition_issue_photos} to {fresh_photo_url}"
)
self._upload_photo_to_s3(existing_deal, fresh_photo_url, hubspot_client)
else:
logger.info(f"Hubspot iamge URL unchanged: {fresh_photo_url}")
def _handle_new_photo_upload(
self,