fix: retain last non-empty result set in search polling loop
DSM sends files=[] on the final finished=True poll even when results exist in earlier rounds. Overwriting files each iteration discarded the real results, producing a false "No files found" response. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -287,7 +287,9 @@ def register_filestation(
|
||||
)
|
||||
return f"Error: {e}"
|
||||
|
||||
files = poll_data.get("files", [])
|
||||
current_files: list[dict] = poll_data.get("files", [])
|
||||
if current_files:
|
||||
files = current_files # keep the last non-empty result set
|
||||
finished: bool = poll_data.get("finished", False)
|
||||
|
||||
if finished:
|
||||
|
||||
Reference in New Issue
Block a user