Browse Source

Specify sort order not to change document order when it is checked

pull/489/head
Hironsan 4 years ago
parent
commit
65e80b89e2
1 changed files with 2 additions and 0 deletions
  1. 2
      app/api/views.py

2
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

Loading…
Cancel
Save