Преглед изворни кода

fix delete message error (#2153)

### What problem does this PR solve?



### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.11.0
Kevin Hu пре 1 година
родитељ
комит
fc1ac3a962
No account linked to committer's email address
2 измењених фајлова са 2 додато и 1 уклоњено
  1. 1
    1
      api/apps/conversation_app.py
  2. 1
    0
      api/db/services/task_service.py

+ 1
- 1
api/apps/conversation_app.py Прегледај датотеку

@@ -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)

+ 1
- 0
api/db/services/task_service.py Прегледај датотеку

@@ -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,

Loading…
Откажи
Сачувај