mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
corrections to coordination strings
This commit is contained in:
parent
3b989b2494
commit
d92f035b64
2 changed files with 7 additions and 7 deletions
|
|
@ -6,9 +6,9 @@ from etl.hubspot.utils import parse_hs_date
|
|||
|
||||
class HubspotDealDiffer:
|
||||
COORDINATION_COMPLETE: List[str] = [
|
||||
"v1 ioe/mtp complete",
|
||||
"v2 ioe/mtp complete",
|
||||
"v3 ioe/mtp complete",
|
||||
"(v1) ioe/mtp complete",
|
||||
"(v2) ioe/mtp complete",
|
||||
"(v3) ioe/mtp complete",
|
||||
]
|
||||
RETROFIT_DESIGN_COMPLETE = "uploaded"
|
||||
LODGEMENT_COMPLETE: List[str] = ["lodgement complete", "measures lodged"]
|
||||
|
|
@ -152,7 +152,7 @@ class HubspotDealDiffer:
|
|||
new_status: str = new_deal.get("coordination_status", "")
|
||||
return (
|
||||
new_status != ""
|
||||
and new_status in HubspotDealDiffer.COORDINATION_COMPLETE
|
||||
and new_status.lower() in HubspotDealDiffer.COORDINATION_COMPLETE
|
||||
and new_status != old_deal.coordination_status
|
||||
)
|
||||
|
||||
|
|
@ -161,7 +161,7 @@ class HubspotDealDiffer:
|
|||
new_status: str = new_deal.get("design_status", "")
|
||||
return (
|
||||
new_status != ""
|
||||
and new_status == HubspotDealDiffer.RETROFIT_DESIGN_COMPLETE
|
||||
and new_status.lower() == HubspotDealDiffer.RETROFIT_DESIGN_COMPLETE
|
||||
and new_status != old_deal.design_status
|
||||
)
|
||||
|
||||
|
|
@ -172,6 +172,6 @@ class HubspotDealDiffer:
|
|||
new_status: str = new_deal.get("lodgement_status", "")
|
||||
return (
|
||||
new_status != ""
|
||||
and new_status in HubspotDealDiffer.LODGEMENT_COMPLETE
|
||||
and new_status.lower() in HubspotDealDiffer.LODGEMENT_COMPLETE
|
||||
and new_status != old_deal.lodgement_status
|
||||
)
|
||||
|
|
|
|||
|
|
@ -121,5 +121,5 @@ def _trigger_pashub_fetcher(sqs_client: Any, hubspot_deal: Dict[str, str]) -> No
|
|||
|
||||
|
||||
if __name__ == "__main__":
|
||||
handler({"hubspot_deal_id": "371470706915"}, "")
|
||||
handler({"hubspot_deal_id": "498926855369"}, "")
|
||||
print("beep")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue