From a5627d422608417a039062ed3d6db50ee08e7547 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Tue, 31 Dec 2024 13:09:17 -0800 Subject: [PATCH] refac --- backend/open_webui/models/messages.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/backend/open_webui/models/messages.py b/backend/open_webui/models/messages.py index 12f90053c..87da2f3fb 100644 --- a/backend/open_webui/models/messages.py +++ b/backend/open_webui/models/messages.py @@ -270,16 +270,6 @@ class MessageTable: # Delete all reactions to this message db.query(MessageReaction).filter_by(message_id=id).delete() - # List all replies to this message - replies = db.query(Message).filter_by(parent_id=id).all() - - # Delete all reactions to each reply - for reply in replies: - db.query(MessageReaction).filter_by(message_id=reply.id).delete() - - # Delete all replies to this message - db.query(Message).filter_by(parent_id=id).delete() - db.commit() return True