Merge pull request #942 from Hestia-Homes/feature/hubspot_etl

forgot json
This commit is contained in:
Jun-te Kim 2026-04-01 11:21:28 +01:00 committed by GitHub
commit 22d8264963
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -10,16 +10,25 @@
from etl.hubspot.hubspotClient import HubspotClient
from etl.hubspot.hubspotDataTodB import HubspotDataToDb
from typing import Any
import json
# @subtask_handler() TODO: Do this without subtask_handler but task_handler() that creates task_id and subtask_id
def handler(event: dict[str, Any], context: Any, local: bool = False) -> None:
if local is True:
body = {
"hubspot_deal_id": "409487859944",
event = {
"Records": [
{
"body": json.dumps(
{
"hubspot_deal_id": "409487859944",
}
)
}
]
}
body = event["Records"][0]["body"]
body = json.loads(event["Records"][0]["body"])
hubspot_deal_id = body.get("hubspot_deal_id", "")
if hubspot_deal_id == "":