mirror of
https://github.com/open-webui/open-webui
synced 2024-11-06 00:32:05 +00:00
revert: export chats to include archived chats
This commit is contained in:
parent
2fd2f792d6
commit
74dd9b561a
@ -230,16 +230,13 @@ class ChatTable:
|
|||||||
def get_all_chats(self) -> List[ChatModel]:
|
def get_all_chats(self) -> List[ChatModel]:
|
||||||
return [
|
return [
|
||||||
ChatModel(**model_to_dict(chat))
|
ChatModel(**model_to_dict(chat))
|
||||||
for chat in Chat.select()
|
for chat in Chat.select().order_by(Chat.updated_at.desc())
|
||||||
.where(Chat.archived == False)
|
|
||||||
.order_by(Chat.updated_at.desc())
|
|
||||||
]
|
]
|
||||||
|
|
||||||
def get_all_chats_by_user_id(self, user_id: str) -> List[ChatModel]:
|
def get_all_chats_by_user_id(self, user_id: str) -> List[ChatModel]:
|
||||||
return [
|
return [
|
||||||
ChatModel(**model_to_dict(chat))
|
ChatModel(**model_to_dict(chat))
|
||||||
for chat in Chat.select()
|
for chat in Chat.select()
|
||||||
.where(Chat.archived == False)
|
|
||||||
.where(Chat.user_id == user_id)
|
.where(Chat.user_id == user_id)
|
||||||
.order_by(Chat.updated_at.desc())
|
.order_by(Chat.updated_at.desc())
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user