mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-07-02 22:01:05 +02:00
fix: improve the notification content and improve tooltip
This commit is contained in:
parent
fc0dd8b509
commit
76c760b8dd
3 changed files with 9 additions and 8 deletions
|
|
@ -273,17 +273,18 @@ class IndexingPipelineService:
|
|||
continue
|
||||
|
||||
dup_check = await self.session.execute(
|
||||
select(Document.id).filter(
|
||||
select(Document.id, Document.title).filter(
|
||||
Document.content_hash == content_hash,
|
||||
Document.id != existing.id,
|
||||
)
|
||||
)
|
||||
if dup_check.scalars().first() is not None:
|
||||
dup_row = dup_check.first()
|
||||
if dup_row is not None:
|
||||
if not DocumentStatus.is_state(
|
||||
existing.status, DocumentStatus.READY
|
||||
):
|
||||
existing.status = DocumentStatus.failed(
|
||||
"Duplicate content — already indexed by another document"
|
||||
f"Duplicate content: matches '{dup_row.title}'"
|
||||
)
|
||||
continue
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue