X-Git-Url: https://git.llucax.com/software/sercom.git/blobdiff_plain/5b8a71a4d21a5ee35694718804dda7820f13f768..04677c432f0c579e2ef79e80c1c14d7f1d33369a:/sercom/subcontrollers/docente/__init__.py?ds=sidebyside diff --git a/sercom/subcontrollers/docente/__init__.py b/sercom/subcontrollers/docente/__init__.py index d7d58bc..4759fa6 100644 --- a/sercom/subcontrollers/docente/__init__.py +++ b/sercom/subcontrollers/docente/__init__.py @@ -1,5 +1,6 @@ # vim: set et sw=4 sts=4 encoding=utf-8 : +import cherrypy from turbogears import controllers, expose, redirect from turbogears import validate, validators, flash, error_handler from turbogears.widgets import * @@ -70,9 +71,9 @@ class DocenteController(controllers.Controller, identity.SecureResource): r = validate_get(id) try: r.activo = bool(int(activo)) - except ValueError, e: - raise redirect('../list', tg_flash=_(u'Acción inválida.')) - raise redirect('../list') + except ValueError: + raise cherrypy.NotFound + raise redirect('../../list') @expose(template='kid:%s.templates.new' % __name__) def new(self, **kw):