diff --git a/backend/modules/parsers/unstructured_io.py b/backend/modules/parsers/unstructured_io.py index 705d5e0c..b559c1ac 100644 --- a/backend/modules/parsers/unstructured_io.py +++ b/backend/modules/parsers/unstructured_io.py @@ -87,7 +87,7 @@ async def get_chunks(self, filepath: str, metadata: dict, **kwargs): parsed_data = response.json() for payload in parsed_data: text = payload["text"] - if text == None or len(text) == 0: + if not text: continue metadata = payload["metadata"] final_texts.append(Document(page_content=text, metadata=metadata))