From 9164a18c8e082e97419324e5dbc9dea63b7b7b68 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Thu, 27 Jul 2017 08:05:27 +0200 Subject: [PATCH] Bugfix --- teleforma/exam/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/teleforma/exam/views.py b/teleforma/exam/views.py index 4de61a3d..5f2320f4 100644 --- a/teleforma/exam/views.py +++ b/teleforma/exam/views.py @@ -184,7 +184,7 @@ class ScriptCreateView(ScriptMixinView, CreateView): def get_context_data(self, **kwargs): context = super(ScriptCreateView, self).get_context_data(**kwargs) context['create_fields'] = ['course', 'session', 'type', 'file' ] - course_pk_list = [c['course'].id for c in get_courses(self.request.user) if c.exam_scripts] + course_pk_list = [c['course'].id for c in get_courses(self.request.user) if c['course'].exam_scripts] context['form'].fields['course'].queryset = Course.objects.filter(pk__in=course_pk_list) return context -- 2.39.5