fix delete message error (#2153)

### What problem does this PR solve?



### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Kevin Hu 2024-08-29 14:07:14 +08:00 committed by GitHub
parent 212bb8e601
commit fc1ac3a962
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

@ -227,7 +227,7 @@ def delete_msg():
assert conv["message"][i+1]["id"] == req["message_id"]
conv["message"].pop(i)
conv["message"].pop(i)
conv["reference"].pop(i)
conv["reference"].pop(max(0, i//2-1))
break
ConversationService.update_by_id(conv["id"], conv)

View File

@ -42,6 +42,7 @@ class TaskService(CommonService):
cls.model.doc_id,
cls.model.from_page,
cls.model.to_page,
cls.model.retry_count,
Document.kb_id,
Document.parser_id,
Document.parser_config,