fix: Update collection ID retrieval logic and simplify error logging in AI Knowledge sync event handler

This commit is contained in:
bsiggel
2026-03-12 23:04:01 +00:00
parent 9a3e01d447
commit 9ada48d8c8
2 changed files with 3 additions and 2 deletions

View File

@@ -144,7 +144,8 @@ class AIKnowledgeSync(BaseSyncUtils):
}
)
collection_id = collection['id']
# XAI API returns 'collection_id' not 'id'
collection_id = collection.get('collection_id') or collection.get('id')
# Update EspoCRM: Set datenbankId + change status to 'active'
await espocrm.update_entity('CAIKnowledge', knowledge_id, {