forked from open-webui/open-webui
revert: export chats to include archived chats
This commit is contained in:
parent
2fd2f792d6
commit
74dd9b561a
1 changed files with 1 additions and 4 deletions
|
@ -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 a new issue