diff --git a/backend/open_webui/models/chats.py b/backend/open_webui/models/chats.py index 3fad7867d2..49301a76e7 100644 --- a/backend/open_webui/models/chats.py +++ b/backend/open_webui/models/chats.py @@ -883,6 +883,7 @@ class ChatTable: ): updated['history']['messages'][mid] = message updated['history'] = self.merge_history(updated['history'], {}) + self._repair_chat_current_id(updated) updated = self._clean_null_bytes(updated) chat_item.chat = updated