mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
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:
parent
3ff99619ac
commit
002f782905
1 changed files with 9 additions and 1 deletions
|
|
@ -1,3 +1,4 @@
|
||||||
|
import os
|
||||||
from typing import Any, Dict, List, Optional
|
from typing import Any, Dict, List, Optional
|
||||||
|
|
||||||
from backend.app.db.models.hubspot_deal_data import HubspotDealData
|
from backend.app.db.models.hubspot_deal_data import HubspotDealData
|
||||||
|
|
@ -344,8 +345,15 @@ class HubspotDealDiffer:
|
||||||
== HubspotDealDiffer.ABRI_CONDITION_ASSOCIATED_PROJECT_ID
|
== 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()
|
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
|
@staticmethod
|
||||||
def _has_valid_pashub_link(new_pashub_link: str) -> bool:
|
def _has_valid_pashub_link(new_pashub_link: str) -> bool:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue