fix: map KRS contact data (website, email) during enrichment
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
KRS API returns kontakt_krs with www and email fields. These were not being mapped to Company.website and Company.email. Now enrichment extracts these and normalizes the URL (adds https:// prefix, lowercase). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
4b325cc483
commit
b5458b69fc
@ -110,6 +110,16 @@ def _enrich_company_from_krs(company, db):
|
||||
if adres.get('kod_pocztowy') and not company.address_postal:
|
||||
company.address_postal = adres['kod_pocztowy']
|
||||
|
||||
# Contact from KRS (www, email)
|
||||
kontakt = data_dict.get('kontakt_krs', {})
|
||||
if kontakt.get('www') and not company.website:
|
||||
www = kontakt['www'].strip()
|
||||
if not www.lower().startswith('http'):
|
||||
www = 'https://' + www.lower()
|
||||
company.website = www
|
||||
if kontakt.get('email') and not company.email:
|
||||
company.email = kontakt['email'].lower().strip()
|
||||
|
||||
# Capital
|
||||
kapital = data_dict.get('kapital', {})
|
||||
if kapital.get('zakladowy'):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user