Fix: Truncate country code til max 2 chars (ISO format)
This commit is contained in:
parent
4042c466f8
commit
198c6c56f4
@ -334,6 +334,14 @@ async def sync_from_economic() -> Dict[str, Any]:
|
|||||||
if len(cvr) != 8:
|
if len(cvr) != 8:
|
||||||
cvr = None
|
cvr = None
|
||||||
|
|
||||||
|
# Clean country code (max 2 chars for ISO codes)
|
||||||
|
if country:
|
||||||
|
country = str(country).strip().upper()[:2]
|
||||||
|
if not country:
|
||||||
|
country = 'DK'
|
||||||
|
else:
|
||||||
|
country = 'DK'
|
||||||
|
|
||||||
# Extract email domain
|
# Extract email domain
|
||||||
email_domain = email.split('@')[-1] if '@' in email else None
|
email_domain = email.split('@')[-1] if '@' in email else None
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user