Fire Abri flows on a test project code via an override env var 🟩

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Daniel Roth 2026-07-08 10:25:45 +00:00
parent 3ff99619ac
commit 002f782905

View file

@ -1,3 +1,4 @@
import os
from typing import Any, Dict, List, Optional
from backend.app.db.models.hubspot_deal_data import HubspotDealData
@ -344,8 +345,15 @@ class HubspotDealDiffer:
== HubspotDealDiffer.ABRI_CONDITION_ASSOCIATED_PROJECT_ID
)
# TEST_ABRI_PROJECT_CODE_OVERRIDE lets a non-production deploy fire on a
# sandbox deal's own project code; unset (the production default) falls
# back to the real stock-condition code.
expected_code = (
os.environ.get("TEST_ABRI_PROJECT_CODE_OVERRIDE")
or HubspotDealDiffer.ABRI_CONDITION_PROJECT_CODE
)
new_project_code = (new_deal.get("project_code") or "").lower()
return new_project_code == HubspotDealDiffer.ABRI_CONDITION_PROJECT_CODE.lower()
return new_project_code == expected_code.lower()
@staticmethod
def _has_valid_pashub_link(new_pashub_link: str) -> bool: