X-Git-Url: https://git.mdrn.pl/koed-quiz.git/blobdiff_plain/77043beb3285d1bb46534e29853e579044132726..4c14e51225e284c5b81d53e7f6a5cd0f46ec4d05:/apps/quiz/views.py diff --git a/apps/quiz/views.py b/apps/quiz/views.py index 18a268f..3bd3a84 100644 --- a/apps/quiz/views.py +++ b/apps/quiz/views.py @@ -1,3 +1,7 @@ +# -*- coding: utf-8 -*- +# This file is part of KOED-Quiz, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from django.shortcuts import get_object_or_404, render, redirect from quiz.forms import QuestionForm @@ -18,7 +22,7 @@ def question(request, slug=None): cur_index = ticket.index(request.path) if cur_index: previous_url = ticket[cur_index - 1] - else: + elif ticket: valid_url = ticket[-1] if request.method == 'POST' and valid: