From 300501b138abd3ad67bc6a0e31edd87e7f7a0584 Mon Sep 17 00:00:00 2001 From: Joe Blaylock Date: Fri, 17 Jan 2014 17:43:09 -0800 Subject: [PATCH] Certs - bugfix cert_whitelist output * output after cert_whitelist -a or -d purported to be the whitelist entries for the requested course, but in fact were all of the entries in every course. This commit fixes that. --- .../certificates/management/commands/cert_whitelist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/djangoapps/certificates/management/commands/cert_whitelist.py b/lms/djangoapps/certificates/management/commands/cert_whitelist.py index 94dfda74a6..ce9e5699ab 100644 --- a/lms/djangoapps/certificates/management/commands/cert_whitelist.py +++ b/lms/djangoapps/certificates/management/commands/cert_whitelist.py @@ -67,7 +67,7 @@ class Command(BaseCommand): cert_whitelist.whitelist = False cert_whitelist.save() - whitelist = CertificateWhitelist.objects.all() + whitelist = CertificateWhitelist.objects.filter(course_id=course_id) print "User whitelist for course {0}:\n{1}".format(course_id, '\n'.join(["{0} {1} {2}".format( u.user.username, u.user.email, u.whitelist)