refactor: Improve handling of optional fields and enhance compatibility score calculations
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user