diff --git a/etl/hubspot/hubspot_deal_differ.py b/etl/hubspot/hubspot_deal_differ.py index abb0f3d54..de9680e65 100644 --- a/etl/hubspot/hubspot_deal_differ.py +++ b/etl/hubspot/hubspot_deal_differ.py @@ -13,6 +13,7 @@ class HubspotDealDiffer: ] RETROFIT_DESIGN_COMPLETE = "uploaded" LODGEMENT_COMPLETE: List[str] = ["lodgement complete", "measures lodged"] + ABANDONMENT_ATTEMPTS_THRESHOLD = 3 NEGATIVE_OUTCOMES: List[str] = [ "no answer", "cancelled", @@ -259,7 +260,10 @@ class HubspotDealDiffer: number_of_attempts: Optional[str], outcome: Optional[str] ) -> bool: attempts = parse_hs_int(number_of_attempts) - if attempts is None or attempts < 3: + if ( + attempts is None + or attempts < HubspotDealDiffer.ABANDONMENT_ATTEMPTS_THRESHOLD + ): return False return (outcome or "").lower() in HubspotDealDiffer.NEGATIVE_OUTCOMES