mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
Abri Condition project gate is a reusable helper for future Abri triggers 🟪
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
7aabfdfa5b
commit
592173e1e5
1 changed files with 6 additions and 2 deletions
|
|
@ -175,8 +175,7 @@ class HubspotDealDiffer:
|
|||
def check_for_abri_survey_creation(
|
||||
new_deal: Dict[str, str], old_deal: HubspotDealData
|
||||
) -> bool:
|
||||
new_project_code = (new_deal.get("project_code") or "").lower()
|
||||
if new_project_code != HubspotDealDiffer.ABRI_CONDITION_PROJECT_CODE.lower():
|
||||
if not HubspotDealDiffer._is_abri_condition_deal(new_deal):
|
||||
return False
|
||||
|
||||
if old_deal.confirmed_survey_date is not None:
|
||||
|
|
@ -184,6 +183,11 @@ class HubspotDealDiffer:
|
|||
|
||||
return parse_hs_date(new_deal.get("confirmed_survey_date")) is not None
|
||||
|
||||
@staticmethod
|
||||
def _is_abri_condition_deal(new_deal: Dict[str, str]) -> bool:
|
||||
new_project_code = (new_deal.get("project_code") or "").lower()
|
||||
return new_project_code == HubspotDealDiffer.ABRI_CONDITION_PROJECT_CODE.lower()
|
||||
|
||||
@staticmethod
|
||||
def check_for_magicplan_trigger(
|
||||
new_deal: Dict[str, str], old_deal: HubspotDealData
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue