we can not redirect from a poll, that does not exists to an assignment.
This commit is contained in:
parent
34181cd6ae
commit
ecfeb170f3
@ -250,7 +250,7 @@ def set_publish_status(request, poll_id):
|
|||||||
poll.set_published(True)
|
poll.set_published(True)
|
||||||
except AssignmentPoll.DoesNotExist:
|
except AssignmentPoll.DoesNotExist:
|
||||||
messages.error(request, _('Ballot ID %d does not exist.') % int(poll_id))
|
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():
|
if request.is_ajax():
|
||||||
return ajax_request({'published': poll.published})
|
return ajax_request({'published': poll.published})
|
||||||
|
Loading…
Reference in New Issue
Block a user