@ -81,7 +81,7 @@ class StatisticsAPI(APIView):
annotation_class = project.get_annotation_class()
total = docs.count()
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}