mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +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:
|
class HubspotDealDiffer:
|
||||||
COORDINATION_COMPLETE: List[str] = [
|
COORDINATION_COMPLETE: List[str] = [
|
||||||
"v1 ioe/mtp complete",
|
"(v1) ioe/mtp complete",
|
||||||
"v2 ioe/mtp complete",
|
"(v2) ioe/mtp complete",
|
||||||
"v3 ioe/mtp complete",
|
"(v3) ioe/mtp complete",
|
||||||
]
|
]
|
||||||
RETROFIT_DESIGN_COMPLETE = "uploaded"
|
RETROFIT_DESIGN_COMPLETE = "uploaded"
|
||||||
LODGEMENT_COMPLETE: List[str] = ["lodgement complete", "measures lodged"]
|
LODGEMENT_COMPLETE: List[str] = ["lodgement complete", "measures lodged"]
|
||||||
|
|
@ -152,7 +152,7 @@ class HubspotDealDiffer:
|
||||||
new_status: str = new_deal.get("coordination_status", "")
|
new_status: str = new_deal.get("coordination_status", "")
|
||||||
return (
|
return (
|
||||||
new_status != ""
|
new_status != ""
|
||||||
and new_status in HubspotDealDiffer.COORDINATION_COMPLETE
|
and new_status.lower() in HubspotDealDiffer.COORDINATION_COMPLETE
|
||||||
and new_status != old_deal.coordination_status
|
and new_status != old_deal.coordination_status
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -161,7 +161,7 @@ class HubspotDealDiffer:
|
||||||
new_status: str = new_deal.get("design_status", "")
|
new_status: str = new_deal.get("design_status", "")
|
||||||
return (
|
return (
|
||||||
new_status != ""
|
new_status != ""
|
||||||
and new_status == HubspotDealDiffer.RETROFIT_DESIGN_COMPLETE
|
and new_status.lower() == HubspotDealDiffer.RETROFIT_DESIGN_COMPLETE
|
||||||
and new_status != old_deal.design_status
|
and new_status != old_deal.design_status
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -172,6 +172,6 @@ class HubspotDealDiffer:
|
||||||
new_status: str = new_deal.get("lodgement_status", "")
|
new_status: str = new_deal.get("lodgement_status", "")
|
||||||
return (
|
return (
|
||||||
new_status != ""
|
new_status != ""
|
||||||
and new_status in HubspotDealDiffer.LODGEMENT_COMPLETE
|
and new_status.lower() in HubspotDealDiffer.LODGEMENT_COMPLETE
|
||||||
and new_status != old_deal.lodgement_status
|
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__":
|
if __name__ == "__main__":
|
||||||
handler({"hubspot_deal_id": "371470706915"}, "")
|
handler({"hubspot_deal_id": "498926855369"}, "")
|
||||||
print("beep")
|
print("beep")
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue