Browse Source

Make progress bar only show annotations for the current user.

pull/230/head
Vinay Augustine 5 years ago
parent
commit
79dd516cc5
1 changed files with 2 additions and 1 deletions
  1. 3
      app/server/api.py

3
app/server/api.py

@ -67,7 +67,8 @@ class StatisticsAPI(APIView):
docs = project.documents
annotation_class = project.get_annotation_class()
total = docs.count()
done = annotation_class.objects.filter(document_id__in=docs.all()).\
done = annotation_class.objects.filter(document_id__in=docs.all(),
user_id=self.request.user).\
aggregate(Count('document', distinct=True))['document__count']
remaining = total - done
return {'total': total, 'remaining': remaining}

Loading…
Cancel
Save