Show error message for NameError.
This commit is contained in:
parent
bddf011f6e
commit
17d813e08b
@ -170,6 +170,8 @@ def set_status(request, assignment_id=None, status=None):
|
|||||||
messages.success(request, _('Election status was set to: <b>%s</b>.') % assignment.get_status_display())
|
messages.success(request, _('Election status was set to: <b>%s</b>.') % assignment.get_status_display())
|
||||||
except Assignment.DoesNotExist:
|
except Assignment.DoesNotExist:
|
||||||
pass
|
pass
|
||||||
|
except NameError, e:
|
||||||
|
messages.error(request, e)
|
||||||
return redirect(reverse('assignment_view', args=[assignment_id]))
|
return redirect(reverse('assignment_view', args=[assignment_id]))
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user