Make async call to get agent files from async agent/conversation API

This should avoid the sync_to_async errors thrown by django when
calling the /api/agent/conversation API endpoint
This commit is contained in:
Debanjum
2025-07-30 17:29:14 -07:00
parent b82d4fe68f
commit 6caa6f4008

View File

@@ -138,7 +138,7 @@ async def get_agent_by_conversation(
else:
agent_chat_model = None
has_files = agent.fileobject_set.exists()
has_files = await agent.fileobject_set.aexists()
agents_packet = {
"slug": agent.slug,