Skip to content

Commit

Permalink
fix: shaper exception when retriever return 0 docs. (#4929)
Browse files Browse the repository at this point in the history
* When retriever retrieves 0 documents from the documentStore,
  shaper will raise an exception.

Signed-off-by: root <root@aia-opa-clx-4017.jf.intel.com>
Co-authored-by: root <root@aia-opa-clx-4017.jf.intel.com>
  • Loading branch information
yuanwu2017 and root committed May 17, 2023
1 parent 7625829 commit ca68601
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion haystack/nodes/other/shaper.py
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ def run( # type: ignore
if labels and "labels" not in invocation_context.keys():
invocation_context["labels"] = labels

if documents and "documents" not in invocation_context.keys():
if documents != None and "documents" not in invocation_context.keys():
invocation_context["documents"] = documents

if meta and "meta" not in invocation_context.keys():
Expand Down

0 comments on commit ca68601

Please sign in to comment.