mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-04-02 08:58:11 +02:00
process files with null title (#1989)
This commit is contained in:
parent
036d5c737e
commit
89b6da36a6
@ -129,10 +129,8 @@ def index_doc_batch(
|
||||
# already be no documents that are empty.
|
||||
documents_to_process = []
|
||||
for document in documents:
|
||||
if (
|
||||
not document.title
|
||||
or not document.title.strip()
|
||||
and not any(section.text.strip() for section in document.sections)
|
||||
if (not document.title or not document.title.strip()) and not any(
|
||||
section.text.strip() for section in document.sections
|
||||
):
|
||||
logger.warning(
|
||||
f"Skipping document with ID {document.id} as it has neither title nor content"
|
||||
|
Loading…
x
Reference in New Issue
Block a user