fix(nordagpt): handle None values in company data lists — prevents join() crash
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
This commit is contained in:
parent
8ee998b42f
commit
4b10d38022
@ -436,14 +436,14 @@ def _build_rich_profile(
|
||||
structured_services = []
|
||||
if company.services:
|
||||
for cs in company.services:
|
||||
if cs.service:
|
||||
if cs.service and cs.service.name:
|
||||
structured_services.append(cs.service.name)
|
||||
|
||||
# Competencies from relationship
|
||||
competency_list = []
|
||||
if company.competencies:
|
||||
for cc in company.competencies:
|
||||
if cc.competency:
|
||||
if cc.competency and cc.competency.name:
|
||||
competency_list.append(cc.competency.name)
|
||||
|
||||
# AI Insights
|
||||
|
||||
@ -1490,13 +1490,13 @@ W dyskusji [Artur Wiertel](link) pytał o moderację. Pełna treść: [moje uwag
|
||||
if c.get('services'):
|
||||
system_prompt += f"Usługi: {c['services'][:300]}\n"
|
||||
if c.get('structured_services'):
|
||||
system_prompt += f"Oferta: {', '.join(c['structured_services'][:10])}\n"
|
||||
system_prompt += f"Oferta: {', '.join(str(s) for s in c['structured_services'][:10] if s)}\n"
|
||||
if c.get('ai_insights'):
|
||||
ins = c['ai_insights']
|
||||
if ins.get('services_list'):
|
||||
system_prompt += f"Specjalizacje: {', '.join(ins['services_list'][:8])}\n"
|
||||
system_prompt += f"Specjalizacje: {', '.join(str(s) for s in ins['services_list'][:8] if s)}\n"
|
||||
if ins.get('unique_selling_points'):
|
||||
system_prompt += f"Wyróżniki: {', '.join(ins['unique_selling_points'][:5])}\n"
|
||||
system_prompt += f"Wyróżniki: {', '.join(str(s) for s in ins['unique_selling_points'][:5] if s)}\n"
|
||||
if c.get('google_rating') and c.get('google_reviews'):
|
||||
system_prompt += f"Google: {c['google_rating']}/5 ({c['google_reviews']} opinii)\n"
|
||||
if c.get('phone'):
|
||||
@ -1504,7 +1504,7 @@ W dyskusji [Artur Wiertel](link) pytał o moderację. Pełna treść: [moje uwag
|
||||
if c.get('website'):
|
||||
system_prompt += f"WWW: {c['website']}\n"
|
||||
if c.get('match_reasons'):
|
||||
system_prompt += f"Dopasowanie: {', '.join(c['match_reasons'])}\n"
|
||||
system_prompt += f"Dopasowanie: {', '.join(str(r) for r in c['match_reasons'] if r)}\n"
|
||||
system_prompt += "\n"
|
||||
system_prompt += f"POWYŻSZE {len(matched)} FIRM TO JEDYNE, KTÓRE MOŻESZ WYMIENIĆ.\n"
|
||||
elif context.get('all_companies'):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user