Show error message for NameError.

This commit is contained in:
Emanuel Schuetze 2012-11-21 19:36:12 +01:00
parent bddf011f6e
commit 17d813e08b

View File

@ -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())
except Assignment.DoesNotExist:
pass
except NameError, e:
messages.error(request, e)
return redirect(reverse('assignment_view', args=[assignment_id]))