Fix: move re-index after workflow runs on doc edit (#14558)

This commit is contained in:
shamoon authored and GitHub committed 2026-10-27 19:54:30 -07:00
1 parent 7d8147c21d
commit d4457efe44
2 files changed
+73 -2

No files matched your search

+8 -2
View File
@@ -1304,13 +1304,19 @@ class DocumentViewSet(
from documents.search import get_backend
get_backend().add_or_update(refreshed_doc)
document_updated.send(
sender=self.__class__,
document=refreshed_doc,
)
# Index the final workflow state, including deletion.
backend = get_backend()
final_doc = Document.objects.filter(pk=root_doc.pk).first()
if final_doc is None:
backend.remove(root_doc.pk)
else:
backend.add_or_update(final_doc)
return response
def list(self, request, *args, **kwargs):