diff options
Diffstat (limited to 'yaksh/forms.py')
-rw-r--r-- | yaksh/forms.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/yaksh/forms.py b/yaksh/forms.py index 37741b9..c5bec4c 100644 --- a/yaksh/forms.py +++ b/yaksh/forms.py @@ -167,7 +167,7 @@ class QuestionFilterForm(forms.Form): def __init__(self, *args, **kwargs): user = kwargs.pop("user") super(QuestionFilterForm, self).__init__(*args, **kwargs) - questions = Question.objects.filter(user_id=user) + questions = Question.objects.filter(user_id=user.id) points_list = questions.values_list('points', flat=True).distinct() points_options = [('select', 'Select Marks')] points_options.extend([(point, point) for point in points_list]) |