Commit 8bcb70b8 by Han Su Kim

Filter just downloadable certs for report

parent 4b491592
......@@ -75,8 +75,9 @@ class Command(BaseCommand):
for status in status_tally})
mode_tally = GeneratedCertificate.objects.filter(
course_id__exact=course_id).values('mode').annotate(
dcount=Count('downloadable'))
course_id__exact=course_id,
status__exact='downloadable').values('mode').annotate(
dcount=Count('mode'))
cert_data[course_id].update(
{mode['mode']: mode['dcount']
for mode in mode_tally})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment