Abri survey creation trigger recognises deals by their associated Abri project id 🟩

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Daniel Roth 2026-07-02 16:27:29 +00:00
parent cc682e3e74
commit cf5a272d7e

View file

@ -191,6 +191,13 @@ class HubspotDealDiffer:
def _is_abri_condition_deal(
new_deal: Dict[str, str], new_project: Optional[ProjectData]
) -> bool:
if (
new_project is not None
and new_project["project_id"]
== HubspotDealDiffer.ABRI_CONDITION_ASSOCIATED_PROJECT_ID
):
return True
new_project_code = (new_deal.get("project_code") or "").lower()
return new_project_code == HubspotDealDiffer.ABRI_CONDITION_PROJECT_CODE.lower()