- fix none type error

This commit is contained in:
Zachary Hampton
2025-07-21 17:33:58 -07:00
parent 3013786355
commit 44e6a43cc4
2 changed files with 6 additions and 2 deletions

View File

@@ -175,7 +175,11 @@ def process_extra_property_details(result: dict, get_key_func=None) -> dict:
nearby_schools = result.get("nearbySchools") nearby_schools = result.get("nearbySchools")
schools = nearby_schools.get("schools", []) if nearby_schools else [] schools = nearby_schools.get("schools", []) if nearby_schools else []
tax_history_data = result.get("taxHistory", []) tax_history_data = result.get("taxHistory", [])
assessed_value = tax_history_data[0]["assessment"]["total"] if tax_history_data and tax_history_data[0].get("assessment", {}).get("total") else None
assessed_value = None
if tax_history_data and tax_history_data[0] and tax_history_data[0].get("assessment"):
assessed_value = tax_history_data[0]["assessment"].get("total")
tax_history = tax_history_data tax_history = tax_history_data
if schools: if schools:

View File

@@ -1,6 +1,6 @@
[tool.poetry] [tool.poetry]
name = "homeharvest" name = "homeharvest"
version = "0.5.1" version = "0.5.2"
description = "Real estate scraping library" description = "Real estate scraping library"
authors = ["Zachary Hampton <zachary@bunsly.com>", "Cullen Watson <cullen@bunsly.com>"] authors = ["Zachary Hampton <zachary@bunsly.com>", "Cullen Watson <cullen@bunsly.com>"]
homepage = "https://github.com/Bunsly/HomeHarvest" homepage = "https://github.com/Bunsly/HomeHarvest"