mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-28 10:26:33 +02:00
feat: trigger document reindexing after restoring a document version to ensure content is up-to-date
This commit is contained in:
parent
79f19b9bc6
commit
525fae5abf
1 changed files with 3 additions and 0 deletions
|
|
@ -1285,6 +1285,9 @@ async def restore_document_version(
|
|||
document.content_needs_reindexing = True
|
||||
await session.commit()
|
||||
|
||||
from app.tasks.celery_tasks.document_reindex_tasks import reindex_document_task
|
||||
reindex_document_task.delay(document_id, str(user.id))
|
||||
|
||||
return {
|
||||
"message": f"Restored version {version_number}",
|
||||
"document_id": document_id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue