mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-10-08 20:15:12 +02:00
prevent crash when semantic_identifier is None (#201)
This is a workaround around intermittent issues where sementic_identifier becomes None for some reason. It usually recovers when documents are rescraped. Obviously, we do not yet understand the issue and are interested in a better solution.
This commit is contained in:
@@ -33,7 +33,7 @@ def chunks_to_search_docs(chunks: list[InferenceChunk] | None) -> list[SearchDoc
|
|||||||
blurb=chunk.blurb,
|
blurb=chunk.blurb,
|
||||||
source_type=chunk.source_type,
|
source_type=chunk.source_type,
|
||||||
)
|
)
|
||||||
for chunk in chunks
|
for chunk in chunks if chunk.semantic_identifier
|
||||||
]
|
]
|
||||||
if chunks
|
if chunks
|
||||||
else []
|
else []
|
||||||
|
Reference in New Issue
Block a user