fixes duplicate documents with tags__id__in

This commit is contained in:
jonaswinkler
2021-01-21 12:07:50 +01:00
parent ddf386c4d4
commit aeb10d3407
2 changed files with 9 additions and 0 deletions

View File

@@ -159,6 +159,9 @@ class DocumentViewSet(RetrieveModelMixin,
"added",
"archive_serial_number")
def get_queryset(self):
return Document.objects.distinct()
def get_serializer(self, *args, **kwargs):
fields_param = self.request.query_params.get('fields', None)
if fields_param: