fix: shaper exception when retriever return 0 docs. (#4929)

* 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>
This commit is contained in:
yuanwu2017 2023-05-17 14:48:11 +08:00 committed by GitHub
parent 7625829684
commit ca68601ec7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -740,7 +740,7 @@ class Shaper(BaseComponent):
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():