we can not redirect from a poll, that does not exists to an assignment.

This commit is contained in:
Oskar Hahn 2012-07-27 22:49:38 +02:00
parent 34181cd6ae
commit ecfeb170f3

View File

@ -250,7 +250,7 @@ def set_publish_status(request, poll_id):
poll.set_published(True)
except AssignmentPoll.DoesNotExist:
messages.error(request, _('Ballot ID %d does not exist.') % int(poll_id))
return redirect(reverse('assignment_view', args=[poll.assignment.id]))
return redirect(reverse('assignment_overview'))
if request.is_ajax():
return ajax_request({'published': poll.published})