mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Merge branch 'main' into feature/read-site-notes-pdf
This commit is contained in:
commit
7d20ca18d8
3 changed files with 4 additions and 5 deletions
|
|
@ -8,7 +8,6 @@ from backend.app.config import get_settings
|
||||||
from backend.app.db.connection import get_db_session
|
from backend.app.db.connection import get_db_session
|
||||||
from backend.app.db.models.bulk_address_uploads import BulkAddressUpload
|
from backend.app.db.models.bulk_address_uploads import BulkAddressUpload
|
||||||
from backend.app.bulk_uploads.schema import PostcodeSplitterTriggerRequest
|
from backend.app.bulk_uploads.schema import PostcodeSplitterTriggerRequest
|
||||||
from utils.s3 import parse_s3_uri, read_csv_from_s3
|
|
||||||
|
|
||||||
|
|
||||||
router = APIRouter(
|
router = APIRouter(
|
||||||
|
|
|
||||||
|
|
@ -166,7 +166,7 @@ class HubspotDealDiffer:
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _design_completed(new_deal: Dict[str, str], old_deal: HubspotDealData) -> bool:
|
def _design_completed(new_deal: Dict[str, str], old_deal: HubspotDealData) -> bool:
|
||||||
new_status: str = new_deal.get("coordination_status") or ""
|
new_status: str = new_deal.get("design_status") or ""
|
||||||
return (
|
return (
|
||||||
new_status != ""
|
new_status != ""
|
||||||
and new_status.lower() == HubspotDealDiffer.RETROFIT_DESIGN_COMPLETE
|
and new_status.lower() == HubspotDealDiffer.RETROFIT_DESIGN_COMPLETE
|
||||||
|
|
@ -177,7 +177,7 @@ class HubspotDealDiffer:
|
||||||
def _lodgement_completed(
|
def _lodgement_completed(
|
||||||
new_deal: Dict[str, str], old_deal: HubspotDealData
|
new_deal: Dict[str, str], old_deal: HubspotDealData
|
||||||
) -> bool:
|
) -> bool:
|
||||||
new_status: str = new_deal.get("coordination_status") or ""
|
new_status: str = new_deal.get("lodgement_status") or ""
|
||||||
return (
|
return (
|
||||||
new_status != ""
|
new_status != ""
|
||||||
and new_status.lower() in HubspotDealDiffer.LODGEMENT_COMPLETE
|
and new_status.lower() in HubspotDealDiffer.LODGEMENT_COMPLETE
|
||||||
|
|
|
||||||
|
|
@ -90,8 +90,8 @@ def test_pashub_trigger__pashub_link_changed__returns_true(
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
"coordination_status,expected",
|
"coordination_status,expected",
|
||||||
[
|
[
|
||||||
("v1 ioe/mtp complete", True),
|
("(v1) ioe/mtp complete", True),
|
||||||
("v2 ioe/mtp complete", True),
|
("(v2) ioe/mtp complete", True),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
def test_pashub_trigger__coordination_completed_and_pashub_link_set__returns_true(
|
def test_pashub_trigger__coordination_completed_and_pashub_link_set__returns_true(
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue