diff --git a/backend/hubspot_trigger_orchestrator/hubspot_deal_differ.py b/backend/hubspot_trigger_orchestrator/hubspot_deal_differ.py index 77208432..ad20aca7 100644 --- a/backend/hubspot_trigger_orchestrator/hubspot_deal_differ.py +++ b/backend/hubspot_trigger_orchestrator/hubspot_deal_differ.py @@ -15,11 +15,14 @@ class HubspotDealDiffer: Case 3: Design is completed (and PasHub Link is populated) Case 4: Lodgement is completed (and PasHub Link is populated) """ - new_pashub_link: str = new_deal.get("pashub_link", "") COORDINATION_COMPLETE: List[str] = [ "v1 ioe/mtp complete", "v2 ioe/mtp complete", ] + RETROFIT_DESIGN_COMPLETE = "uploaded" + + new_pashub_link: str = new_deal.get("pashub_link", "") + # Case 1 if not new_pashub_link: return False @@ -40,6 +43,16 @@ class HubspotDealDiffer: ): return True + # Case 3 + new_design_status: str = new_deal.get("design_status", "") + + if ( + new_design_status + and new_design_status == RETROFIT_DESIGN_COMPLETE + and new_design_status != old_deal.design_status + ): + return True + raise NotImplementedError @staticmethod