diff --git a/etl/hubspot/hubspot_deal_differ.py b/etl/hubspot/hubspot_deal_differ.py index b95b544c..f4ece663 100644 --- a/etl/hubspot/hubspot_deal_differ.py +++ b/etl/hubspot/hubspot_deal_differ.py @@ -6,9 +6,9 @@ from etl.hubspot.utils import parse_hs_date class HubspotDealDiffer: COORDINATION_COMPLETE: List[str] = [ - "v1 ioe/mtp complete", - "v2 ioe/mtp complete", - "v3 ioe/mtp complete", + "(v1) ioe/mtp complete", + "(v2) ioe/mtp complete", + "(v3) ioe/mtp complete", ] RETROFIT_DESIGN_COMPLETE = "uploaded" LODGEMENT_COMPLETE: List[str] = ["lodgement complete", "measures lodged"] @@ -152,7 +152,7 @@ class HubspotDealDiffer: new_status: str = new_deal.get("coordination_status", "") return ( new_status != "" - and new_status in HubspotDealDiffer.COORDINATION_COMPLETE + and new_status.lower() in HubspotDealDiffer.COORDINATION_COMPLETE and new_status != old_deal.coordination_status ) @@ -161,7 +161,7 @@ class HubspotDealDiffer: new_status: str = new_deal.get("design_status", "") return ( new_status != "" - and new_status == HubspotDealDiffer.RETROFIT_DESIGN_COMPLETE + and new_status.lower() == HubspotDealDiffer.RETROFIT_DESIGN_COMPLETE and new_status != old_deal.design_status ) @@ -172,6 +172,6 @@ class HubspotDealDiffer: new_status: str = new_deal.get("lodgement_status", "") return ( new_status != "" - and new_status in HubspotDealDiffer.LODGEMENT_COMPLETE + and new_status.lower() in HubspotDealDiffer.LODGEMENT_COMPLETE and new_status != old_deal.lodgement_status ) diff --git a/etl/hubspot/scripts/scraper/main.py b/etl/hubspot/scripts/scraper/main.py index 9fe08889..f7dc1076 100644 --- a/etl/hubspot/scripts/scraper/main.py +++ b/etl/hubspot/scripts/scraper/main.py @@ -121,5 +121,5 @@ def _trigger_pashub_fetcher(sqs_client: Any, hubspot_deal: Dict[str, str]) -> No if __name__ == "__main__": - handler({"hubspot_deal_id": "371470706915"}, "") + handler({"hubspot_deal_id": "498926855369"}, "") print("beep")