From 2d9aa51929c32d94d0ae1d75765e9842dcd58d1a Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Wed, 3 Jun 2026 14:54:54 +0000 Subject: [PATCH] don't include sharepoint link when triggering pashub fetcher from hubspot etl --- etl/hubspot/scripts/scraper/main.py | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/etl/hubspot/scripts/scraper/main.py b/etl/hubspot/scripts/scraper/main.py index 176e9b15..589e526b 100644 --- a/etl/hubspot/scripts/scraper/main.py +++ b/etl/hubspot/scripts/scraper/main.py @@ -67,7 +67,9 @@ def handler(body: dict[str, Any], context: Any) -> None: logger.info( f"Triggering MagicPlan fetcher for HubSpot deal ID {hubspot_deal_id}" ) - _trigger_magicplan_fetcher(sqs_client, hubspot_deal, listing, hubspot_deal_id) + _trigger_magicplan_fetcher( + sqs_client, hubspot_deal, listing, hubspot_deal_id + ) else: # Deal already in db, check whether anything has changed logger.info( @@ -119,13 +121,18 @@ def handler(body: dict[str, Any], context: Any) -> None: logger.info( f"Triggering MagicPlan fetcher for HubSpot deal ID {hubspot_deal_id}" ) - _trigger_magicplan_fetcher(sqs_client, hubspot_deal, listing, hubspot_deal_id) + _trigger_magicplan_fetcher( + sqs_client, hubspot_deal, listing, hubspot_deal_id + ) print("done") def _trigger_magicplan_fetcher( - sqs_client: Any, hubspot_deal: Dict[str, str], listing: Optional[dict[str, str]], hubspot_deal_id: str + sqs_client: Any, + hubspot_deal: Dict[str, str], + listing: Optional[dict[str, str]], + hubspot_deal_id: str, ) -> None: message_body = { "address": hubspot_deal.get("dealname"), @@ -136,9 +143,7 @@ def _trigger_magicplan_fetcher( QueueUrl=get_settings().MAGICPLAN_SQS_URL, MessageBody=json.dumps(message_body), ) - logger.info( - f"Sent message to MagicPlan queue. MessageId: {response['MessageId']}" - ) + logger.info(f"Sent message to MagicPlan queue. MessageId: {response['MessageId']}") def _trigger_pashub_fetcher( @@ -148,7 +153,7 @@ def _trigger_pashub_fetcher( "pashub_link": hubspot_deal["pashub_link"], "address": None, # potentially available from Listing, leave as None for now "hubspot_deal_id": deal_id, - "sharepoint_link": hubspot_deal.get("sharepoint_link", None), + # "sharepoint_link": hubspot_deal.get("sharepoint_link", None), # Don't send sharepoint link for now as they are inconsistent "uprn": hubspot_deal.get("national_uprn", None), "landlord_property_id": hubspot_deal.get("owner_property_id", None), "deal_stage": hubspot_deal.get("deal_stage", None),