Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
74dd9b56
Commit
74dd9b56
authored
Apr 20, 2024
by
Timothy J. Baek
Browse files
revert: export chats to include archived chats
parent
2fd2f792
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
4 deletions
+1
-4
backend/apps/web/models/chats.py
backend/apps/web/models/chats.py
+1
-4
No files found.
backend/apps/web/models/chats.py
View file @
74dd9b56
...
...
@@ -230,16 +230,13 @@ class ChatTable:
def
get_all_chats
(
self
)
->
List
[
ChatModel
]:
return
[
ChatModel
(
**
model_to_dict
(
chat
))
for
chat
in
Chat
.
select
()
.
where
(
Chat
.
archived
==
False
)
.
order_by
(
Chat
.
updated_at
.
desc
())
for
chat
in
Chat
.
select
().
order_by
(
Chat
.
updated_at
.
desc
())
]
def
get_all_chats_by_user_id
(
self
,
user_id
:
str
)
->
List
[
ChatModel
]:
return
[
ChatModel
(
**
model_to_dict
(
chat
))
for
chat
in
Chat
.
select
()
.
where
(
Chat
.
archived
==
False
)
.
where
(
Chat
.
user_id
==
user_id
)
.
order_by
(
Chat
.
updated_at
.
desc
())
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment