Fix broken date range search

This commit is contained in:
Michael Shamoon 2023-01-25 08:37:26 -08:00
parent 51a5746611
commit 5e9a7b94ba

View File

@ -468,6 +468,8 @@ class DocumentViewSet(
class SearchResultSerializer(DocumentSerializer):
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(
[