refactor: Improve handling of optional fields and enhance compatibility score calculations

This commit is contained in:
2025-10-15 17:58:31 +00:00
parent 7f924b60ec
commit 0765cca90d
7 changed files with 31 additions and 22 deletions
+2 -2
View File
@@ -127,7 +127,7 @@ def _calculate_project_fund_compatibility(
geo_score = 0
if project.location and fund.geographic_focus:
project_location_lower = project.location.lower()
fund_geo_lower = fund.geographic_focus.lower()
fund_geo_lower = (fund.geographic_focus or "").lower()
# Exact match
if project_location_lower == fund_geo_lower:
@@ -223,7 +223,7 @@ def _calculate_project_investor_direct_compatibility(
geo_score = 0
if project.location and investor.geographic_focus:
project_location_lower = project.location.lower()
investor_geo_lower = investor.geographic_focus.lower()
investor_geo_lower = (investor.geographic_focus or "").lower()
if project_location_lower == investor_geo_lower:
geo_score = 20