From 15c8f0c14c36616ab8406ee620db943c758c153a Mon Sep 17 00:00:00 2001 From: Jael Gu Date: Tue, 21 Feb 2023 16:09:06 +0800 Subject: [PATCH] Fix for list inputs Signed-off-by: Jael Gu --- es_index.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/es_index.py b/es_index.py index 83fb15e..8866904 100644 --- a/es_index.py +++ b/es_index.py @@ -38,6 +38,9 @@ class ESIndex(PyOperator): def __call__(self, doc: Union[dict, List[dict]]): if isinstance(doc, dict): docs = [doc] + else: + docs = doc + for x in docs: assert isinstance(x, dict)