mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Fix coordination/design field names and add MagicPlan trigger to HubspotDealDiffer 🟩
This commit is contained in:
parent
676022a4c0
commit
69faa530a4
1 changed files with 8 additions and 3 deletions
|
|
@ -178,7 +178,7 @@ class HubspotDealDiffer:
|
|||
def _coordination_completed(
|
||||
new_deal: Dict[str, str], old_deal: HubspotDealData
|
||||
) -> bool:
|
||||
new_status: str = new_deal.get("coordination_status") or ""
|
||||
new_status: str = new_deal.get("coordination_status__stage_1_") or ""
|
||||
return (
|
||||
new_status != ""
|
||||
and new_status.lower() in HubspotDealDiffer.COORDINATION_COMPLETE
|
||||
|
|
@ -187,7 +187,7 @@ class HubspotDealDiffer:
|
|||
|
||||
@staticmethod
|
||||
def _design_completed(new_deal: Dict[str, str], old_deal: HubspotDealData) -> bool:
|
||||
new_status: str = new_deal.get("design_status") or ""
|
||||
new_status: str = new_deal.get("retrofit_design_status") or ""
|
||||
return (
|
||||
new_status != ""
|
||||
and new_status.lower() == HubspotDealDiffer.RETROFIT_DESIGN_COMPLETE
|
||||
|
|
@ -198,7 +198,12 @@ class HubspotDealDiffer:
|
|||
def check_for_magicplan_trigger(
|
||||
new_deal: Dict[str, str], old_deal: HubspotDealData
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
new_status = (new_deal.get("coordination_status__stage_1_") or "").lower()
|
||||
old_status = (old_deal.coordination_status or "").lower()
|
||||
return (
|
||||
new_status in HubspotDealDiffer.COORDINATION_COMPLETE
|
||||
and old_status not in HubspotDealDiffer.COORDINATION_COMPLETE
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
def _lodgement_completed(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue