mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
pashub trigger true if pashub link is changed 🟩
This commit is contained in:
parent
39f37f1668
commit
9f7448ac43
1 changed files with 17 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue