mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-27 23:35:01 +00:00
Persist the deal's extra booking information from the scrape 🟩
The differ and the HubSpot fetch already named notes_for_surveyor, but the SQLModel had no such field, so check_for_db_update_trigger raised AttributeError on every deal and the scrape could not diff at all. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
bd01a08da8
commit
a397eba48d
2 changed files with 6 additions and 0 deletions
|
|
@ -26,6 +26,10 @@ class HubspotDealData(SQLModel, table=True):
|
|||
number_of_attempts: Optional[str] = Field(default=None)
|
||||
outcome_notes: Optional[str] = Field(default=None)
|
||||
booking_status: Optional[str] = Field(default=None)
|
||||
# The HubSpot deal property behind the "Extra booking information"
|
||||
# label; the property ID is fixed externally and is what the scrape,
|
||||
# the differ and the Abri void flag all key on.
|
||||
notes_for_surveyor: Optional[str] = Field(default=None)
|
||||
|
||||
major_condition_issue_description: Optional[str] = Field(default=None)
|
||||
major_condition_issue_photos: Optional[str] = Field(default=None)
|
||||
|
|
|
|||
|
|
@ -214,6 +214,7 @@ class HubspotDataToDb:
|
|||
"number_of_attempts": deal_data.get("number_of_attempts"),
|
||||
"outcome_notes": deal_data.get("outcome_notes"),
|
||||
"booking_status": deal_data.get("booking_status"),
|
||||
"notes_for_surveyor": deal_data.get("notes_for_surveyor"),
|
||||
"project_code": deal_data.get("project_code"),
|
||||
"company_id": company,
|
||||
"major_condition_issue_description": deal_data.get(
|
||||
|
|
@ -340,6 +341,7 @@ class HubspotDataToDb:
|
|||
number_of_attempts=deal_data.get("number_of_attempts"),
|
||||
outcome_notes=deal_data.get("outcome_notes"),
|
||||
booking_status=deal_data.get("booking_status"),
|
||||
notes_for_surveyor=deal_data.get("notes_for_surveyor"),
|
||||
project_code=deal_data.get("project_code"),
|
||||
company_id=company,
|
||||
major_condition_issue_description=deal_data.get(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue