1
0
mirror of https://github.com/etesync/server synced 2024-12-28 18:28:07 +00:00

Collection item list: limit only to non-deleted by default.

This commit is contained in:
Tom Hacohen 2020-02-26 16:42:49 +02:00
parent 452a8f1e7e
commit f4cb7cb74f

View File

@ -110,7 +110,9 @@ class CollectionItemViewSet(BaseViewSet):
except Collection.DoesNotExist:
raise Http404("Collection does not exist")
# XXX Potentially add this for performance: .prefetch_related('revisions__chunks')
queryset = type(self).queryset.filter(collection__pk=collection.pk)
queryset = type(self).queryset.filter(collection__pk=collection.pk,
revisions__current=True,
revisions__isDeletion=False)
return queryset