From a3705a9fa8104d67e1d1ff1514c6e241dd830fec Mon Sep 17 00:00:00 2001 From: JSCU-CNI <121175071+JSCU-CNI@users.noreply.github.com> Date: Wed, 8 Jan 2025 15:21:47 +0100 Subject: [PATCH] handle NoneType in document_stream --- flow/record/adapter/elastic.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flow/record/adapter/elastic.py b/flow/record/adapter/elastic.py index ad0de30..035199d 100644 --- a/flow/record/adapter/elastic.py +++ b/flow/record/adapter/elastic.py @@ -128,6 +128,8 @@ def document_stream(self) -> Iterator[dict]: record = self.queue.get() if record is StopIteration: break + if not record: + continue yield self.record_to_document(record, index=self.index) def streaming_bulk_thread(self) -> None: