mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-05-12 04:40:09 +02:00
Don't get duplicate docs during user group syncing
This commit is contained in:
parent
9c8cfd9175
commit
c6e49a3034
@ -80,6 +80,8 @@ def fetch_documents_for_user_group_paginated(
|
||||
)
|
||||
if last_document_id is not None:
|
||||
stmt = stmt.where(Document.id > last_document_id)
|
||||
stmt = stmt.distinct()
|
||||
|
||||
documents = db_session.scalars(stmt).all()
|
||||
return documents, documents[-1].id if documents else None
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user