From 5778b6f9e940624f0398c5e56a8d52ddaba2f2c4 Mon Sep 17 00:00:00 2001 From: Stefano Fiorucci <44616784+anakin87@users.noreply.github.com> Date: Wed, 10 Aug 2022 12:59:15 +0200 Subject: [PATCH] fix run_batch unbound error (#3016) --- haystack/pipelines/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/haystack/pipelines/base.py b/haystack/pipelines/base.py index b98312619..cad05cbad 100644 --- a/haystack/pipelines/base.py +++ b/haystack/pipelines/base.py @@ -600,8 +600,8 @@ class Pipeline: raise PipelineError("For indexing, only a single query can be provided.") if isinstance(labels, list): raise PipelineError("For indexing, only one MultiLabel object can be provided as labels.") + flattened_documents: List[Document] = [] if documents and isinstance(documents[0], list): - flattened_documents: List[Document] = [] for doc_list in documents: assert isinstance(doc_list, list) flattened_documents.extend(doc_list)