diff --git a/app/api/views.py b/app/api/views.py index c0f694d3..94cb017f 100644 --- a/app/api/views.py +++ b/app/api/views.py @@ -150,6 +150,8 @@ class DocumentList(generics.ListCreateAPIView): queryset = project.documents if project.randomize_document_order: queryset = queryset.annotate(sort_id=F('id') % self.request.user.id).order_by('sort_id') + else: + queryset = queryset.order_by('id') return queryset