From 9f7448ac438cbfd6ece4f91d556fa58f2798abce Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Wed, 8 Apr 2026 15:35:42 +0000 Subject: [PATCH] =?UTF-8?q?pashub=20trigger=20true=20if=20pashub=20link=20?= =?UTF-8?q?is=20changed=20=F0=9F=9F=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hubspot_deal_differ.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/backend/hubspot_trigger_orchestrator/hubspot_deal_differ.py b/backend/hubspot_trigger_orchestrator/hubspot_deal_differ.py index 9d66c637..50f3af04 100644 --- a/backend/hubspot_trigger_orchestrator/hubspot_deal_differ.py +++ b/backend/hubspot_trigger_orchestrator/hubspot_deal_differ.py @@ -9,6 +9,23 @@ class HubspotDealDiffer: def check_for_pashub_trigger( new_deal: Dict[str, str], old_deal: HubspotDealData ) -> bool: + """ + Case 1: PasHub Link is updated + Case 2: Coordination is completed (and PasHub Link is populated) + Case 3: Design is completed (and PasHub Link is populated) + Case 4: Lodgement is completed (and PasHub Link is populated) + """ + new_pashub_link: Optional[str] = new_deal["pashub_link"] + # Case 1 + if not new_pashub_link: + return False + + if not old_deal.pashub_link: + return True + + if old_deal.pashub_link != new_pashub_link: + return True + raise NotImplementedError @staticmethod