forked from open-webui/open-webui
		
	fix: non existent chat page issue
This commit is contained in:
		
							parent
							
								
									b777b6d2aa
								
							
						
					
					
						commit
						0c30a08596
					
				
					 3 changed files with 47 additions and 34 deletions
				
			
		|  | @ -75,7 +75,14 @@ async def get_chat_by_id(id: str, cred=Depends(bearer_scheme)): | |||
| 
 | ||||
|     if user: | ||||
|         chat = Chats.get_chat_by_id_and_user_id(id, user.id) | ||||
|         return ChatResponse(**{**chat.model_dump(), "chat": json.loads(chat.chat)}) | ||||
| 
 | ||||
|         if chat: | ||||
|             return ChatResponse(**{**chat.model_dump(), "chat": json.loads(chat.chat)}) | ||||
|         else: | ||||
|             raise HTTPException( | ||||
|                 status_code=status.HTTP_401_UNAUTHORIZED, | ||||
|                 detail=ERROR_MESSAGES.NOT_FOUND, | ||||
|             ) | ||||
|     else: | ||||
|         raise HTTPException( | ||||
|             status_code=status.HTTP_401_UNAUTHORIZED, | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Timothy J. Baek
						Timothy J. Baek