From 592173e1e578aab04d887825bef78fc66b3696dd Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Thu, 2 Jul 2026 16:03:34 +0000 Subject: [PATCH] =?UTF-8?q?Abri=20Condition=20project=20gate=20is=20a=20re?= =?UTF-8?q?usable=20helper=20for=20future=20Abri=20triggers=20=F0=9F=9F=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- etl/hubspot/hubspot_deal_differ.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/etl/hubspot/hubspot_deal_differ.py b/etl/hubspot/hubspot_deal_differ.py index 2e963eb54..6fbcf3432 100644 --- a/etl/hubspot/hubspot_deal_differ.py +++ b/etl/hubspot/hubspot_deal_differ.py @@ -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