mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-23 23:48:56 +01:00
Handle null ref, when refresh conversation from db in websocket chat
This commit is contained in:
parent
37879a7850
commit
9e068fad4f
1 changed files with 2 additions and 1 deletions
|
@ -338,6 +338,7 @@ async def websocket_endpoint(
|
||||||
await websocket.accept()
|
await websocket.accept()
|
||||||
while connection_alive:
|
while connection_alive:
|
||||||
try:
|
try:
|
||||||
|
if conversation:
|
||||||
await sync_to_async(conversation.refresh_from_db)(fields=["conversation_log"])
|
await sync_to_async(conversation.refresh_from_db)(fields=["conversation_log"])
|
||||||
q = await websocket.receive_text()
|
q = await websocket.receive_text()
|
||||||
except WebSocketDisconnect:
|
except WebSocketDisconnect:
|
||||||
|
|
Loading…
Reference in a new issue