diff options
Diffstat (limited to 'exam')
-rw-r--r-- | exam/views.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/exam/views.py b/exam/views.py index cd91ef8..ed73adf 100644 --- a/exam/views.py +++ b/exam/views.py @@ -124,7 +124,9 @@ def start(request): try: profile = user.get_profile() except Profile.DoesNotExist: - profile = None + msg = 'You do not have a profile and cannot take the quiz!' + raise Http404(msg) + new_paper = QuestionPaper(user=user, user_ip=ip, key=key, quiz=quiz, profile=profile) new_paper.start_time = datetime.datetime.now() |