mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-04-10 04:49:29 +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:
parent
17e2008027
commit
878d4e367f
@ -33,7 +33,7 @@ def chunks_to_search_docs(chunks: list[InferenceChunk] | None) -> list[SearchDoc
|
||||
blurb=chunk.blurb,
|
||||
source_type=chunk.source_type,
|
||||
)
|
||||
for chunk in chunks
|
||||
for chunk in chunks if chunk.semantic_identifier
|
||||
]
|
||||
if chunks
|
||||
else []
|
||||
|
Loading…
x
Reference in New Issue
Block a user