Await result for determining if user has entries

This commit is contained in:
sabaimran 2023-11-10 13:51:56 -08:00
parent 1a56344f12
commit e62788ad79

View file

@ -663,7 +663,7 @@ async def extract_references_and_questions(
if conversation_type == ConversationCommand.General: if conversation_type == ConversationCommand.General:
return compiled_references, inferred_queries, q return compiled_references, inferred_queries, q
if not sync_to_async(EntryAdapters.user_has_entries)(user=user): if not await sync_to_async(EntryAdapters.user_has_entries)(user=user):
logger.warning( logger.warning(
"No content index loaded, so cannot extract references from knowledge base. Please configure your data sources and update the index to chat with your notes." "No content index loaded, so cannot extract references from knowledge base. Please configure your data sources and update the index to chat with your notes."
) )