Debug: Tilføjet logging af account_id værdier for kontakter

This commit is contained in:
Christian 2025-12-22 14:34:07 +01:00
parent 6398a7ca5f
commit 82ecfda404

View File

@ -283,6 +283,11 @@ async def sync_vtiger_contacts() -> Dict[str, Any]:
# Link contact to customer if account_id exists
account_id = contact.get('account_id')
# Debug: Log first 10 contacts with account_id info
if len(contacts) < 20: # Only log for small batches or first few
logger.info(f"🔍 Debug kontakt: {first_name} {last_name}, account_id={account_id}, contact_id={contact_id if 'contact_id' in locals() else 'N/A'}")
if account_id and contact_id:
# Find customer by vTiger account ID
customer = execute_query(