mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-01-30 23:26:36 +08:00
Make document change-status idempotent for Infinity doc store (#12717)
### What problem does this PR solve? This PR makes the document change‑status endpoint idempotent under the Infinity doc store. If a document already has the requested status, the handler returns success without touching the engine, preventing unnecessary updates and avoiding missing‑table errors while keeping responses consistent. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -25,8 +25,7 @@ def add_sessions_with_chat_assistant(request: FixtureRequest, add_chat_assistant
|
||||
for chat_assistant in chat_assistants:
|
||||
try:
|
||||
chat_assistant.delete_sessions(ids=None)
|
||||
except Exception as e:
|
||||
print(f"Exception: {e}")
|
||||
except Exception :
|
||||
pass
|
||||
|
||||
request.addfinalizer(cleanup)
|
||||
@ -41,8 +40,8 @@ def add_sessions_with_chat_assistant_func(request: FixtureRequest, add_chat_assi
|
||||
for chat_assistant in chat_assistants:
|
||||
try:
|
||||
chat_assistant.delete_sessions(ids=None)
|
||||
except Exception as e:
|
||||
print(f"Exception: {e}")
|
||||
except Exception :
|
||||
pass
|
||||
|
||||
request.addfinalizer(cleanup)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user