Merge pull request #994 from Hestia-Homes/feature/pashub-to-ara

Correct reading of coordination status when deciding whether to trigger Pashub file fetcher
This commit is contained in:
Jun-te Kim 2026-04-17 14:56:07 +01:00 committed by GitHub
commit 5e5fca8830
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -149,7 +149,7 @@ class HubspotDealDiffer:
def _coordination_completed(
new_deal: Dict[str, str], old_deal: HubspotDealData
) -> bool:
new_status: str = new_deal.get("coordination_status", "")
new_status: str = new_deal.get("coordination_status") or ""
return (
new_status != ""
and new_status.lower() in HubspotDealDiffer.COORDINATION_COMPLETE
@ -158,7 +158,7 @@ class HubspotDealDiffer:
@staticmethod
def _design_completed(new_deal: Dict[str, str], old_deal: HubspotDealData) -> bool:
new_status: str = new_deal.get("design_status", "")
new_status: str = new_deal.get("coordination_status") or ""
return (
new_status != ""
and new_status.lower() == HubspotDealDiffer.RETROFIT_DESIGN_COMPLETE
@ -169,7 +169,7 @@ class HubspotDealDiffer:
def _lodgement_completed(
new_deal: Dict[str, str], old_deal: HubspotDealData
) -> bool:
new_status: str = new_deal.get("lodgement_status", "")
new_status: str = new_deal.get("coordination_status") or ""
return (
new_status != ""
and new_status.lower() in HubspotDealDiffer.LODGEMENT_COMPLETE