search router change for UI test
This commit is contained in:
parent
8f66ab5587
commit
f214f5dbc5
1 changed files with 4 additions and 0 deletions
|
|
@ -118,6 +118,10 @@ def get_search_router() -> APIRouter:
|
|||
top_k=payload.top_k,
|
||||
)
|
||||
|
||||
# Ensure response conforms to response_model=list
|
||||
if not isinstance(results, list):
|
||||
results = [results]
|
||||
|
||||
return results
|
||||
except PermissionDeniedError:
|
||||
return []
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue