pashub trigger true if pashub link is changed 🟩

This commit is contained in:
Daniel Roth 2026-04-08 15:35:42 +00:00
parent 39f37f1668
commit 9f7448ac43

View file

@ -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