A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
Merge branch 'dev' into feature-permissions
Michael Shamoond15773f28234
diff --cc src/documents/views.pyindex 70936e4fc,6a719fe70..d982c0a21--- a/src/documents/views.py+++ b/src/documents/views.py@@@ -501,19 -474,12 +510,12 @@@ class DocumentViewSet)-class SearchResultSerializer(DocumentSerializer):+class SearchResultSerializer(DocumentSerializer, PassUserMixin):def to_representation(self, instance):doc = Document.objects.get(id=instance["id"])- comments = ""- if hasattr(instance.results.q, "subqueries"):- commentTerm = instance.results.q.subqueries[0]- comments = ",".join(- [- str(c.comment)- for c in Comment.objects.filter(document=instance["id"])- if commentTerm.text in c.comment- ],- )+ comments = ",".join(+ [str(c.comment) for c in Comment.objects.filter(document=instance["id"])],+ )r = super().to_representation(doc)r["__search_hit__"] = {"score": instance.score,