X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/357027375ff8867f42ca34bcbfb5a78b5b185fc3..e9263ed76910227deccdce1469b4edda3b833be1:/src/polls/views.py?ds=sidebyside diff --git a/src/polls/views.py b/src/polls/views.py index 79540c66a..0d9590d85 100644 --- a/src/polls/views.py +++ b/src/polls/views.py @@ -15,12 +15,11 @@ from .forms import PollForm @cache.never_cache @require_http_methods(['GET', 'POST']) def poll(request, slug): - poll = get_object_or_404(Poll, slug=slug, open=True) if request.method == 'POST': - redirect_to = reverse('poll', args = [slug]) - form = PollForm(request.POST, poll = poll) + redirect_to = reverse('poll', args=[slug]) + form = PollForm(request.POST, poll=poll) if form.is_valid(): if not poll.voted(request.session): try: