mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-27 23:35:01 +00:00
Treat a blank surveyor as unset when checking for booking amendments 🟩
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
234270a1ca
commit
137ebd9456
1 changed files with 6 additions and 1 deletions
|
|
@ -320,7 +320,12 @@ class HubspotDealDiffer:
|
|||
|
||||
new_survey_date = parse_hs_date(new_deal.get("confirmed_survey_date"))
|
||||
new_survey_time = new_deal.get("confirmed_survey_time")
|
||||
new_surveyor = new_deal.get("third_party_surveyor_identifier")
|
||||
# HubSpot sends "" for an unset property; the DB stores None. Treat
|
||||
# them as the same so a booked deal doesn't amend on every scrape.
|
||||
raw_surveyor = new_deal.get("third_party_surveyor_identifier")
|
||||
new_surveyor = (
|
||||
raw_surveyor if raw_surveyor is not None and raw_surveyor.strip() else None
|
||||
)
|
||||
logger.info(
|
||||
"Abri job-amendment check: "
|
||||
"old_confirmed_survey_date=%s new_confirmed_survey_date=%s "
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue