From b3785eda291e1ef0040ff81b986ef49d1008dfbf Mon Sep 17 00:00:00 2001 From: eugena Date: Sat, 22 Aug 2015 22:16:29 +0500 Subject: [PATCH] new sitting isn't allowed with empty question set --- quiz/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/quiz/models.py b/quiz/models.py index da2da4f..137a413 100644 --- a/quiz/models.py +++ b/quiz/models.py @@ -314,7 +314,8 @@ class SittingManager(models.Manager): question_set = question_set.values_list('id', flat=True) if len(question_set) == 0: - raise ImproperlyConfigured('Question set of the quiz is empty. Please configure questions properly') + raise ImproperlyConfigured('Question set of the quiz is empty. ' + 'Please configure questions properly') if quiz.max_questions and quiz.max_questions < len(question_set): question_set = question_set[:quiz.max_questions] -- 2.39.5