Skip to content

Commit 2cf2565

Browse files
committed
refac
1 parent 5669d10 commit 2cf2565

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

backend/open_webui/migrations/versions/8452d01d26d7_add_chat_message_table.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,11 @@ def upgrade() -> None:
8888
sa.column("updated_at", sa.BigInteger()),
8989
)
9090

91-
# Fetch all chats
91+
# Fetch all chats (excluding shared chats which contain 'shared' in id)
9292
chats = conn.execute(
93-
sa.select(chat_table.c.id, chat_table.c.user_id, chat_table.c.chat)
93+
sa.select(chat_table.c.id, chat_table.c.user_id, chat_table.c.chat).where(
94+
~chat_table.c.id.like("%shared%")
95+
)
9496
).fetchall()
9597

9698
now = int(time.time())

0 commit comments

Comments
 (0)