vip11017 commited on
Commit
5e0d69f
·
1 Parent(s): ba1aafb

added blank array if no starred

Browse files
Files changed (1) hide show
  1. app/routers/chats.py +1 -1
app/routers/chats.py CHANGED
@@ -79,7 +79,7 @@ async def get_starred_chats():
79
  starred_chats = await chats_cursor.to_list(length=None)
80
 
81
  if not starred_chats:
82
- raise HTTPException(status_code=404, detail="No Chat Logs found")
83
 
84
  for chat in starred_chats:
85
  chat['id'] = str(chat['_id'])
 
79
  starred_chats = await chats_cursor.to_list(length=None)
80
 
81
  if not starred_chats:
82
+ starred_chats = []
83
 
84
  for chat in starred_chats:
85
  chat['id'] = str(chat['_id'])