X-Git-Url: https://git.llucax.com/software/sercom.git/blobdiff_plain/8a153c437103b4bd100ebaa66719f57ef1ea597d..8fa6a4ab1ebc11f4c4282c3c519919d397b3effb:/sercom/subcontrollers/misentregas/__init__.py?ds=inline diff --git a/sercom/subcontrollers/misentregas/__init__.py b/sercom/subcontrollers/misentregas/__init__.py index 65420c9..57d7b8a 100644 --- a/sercom/subcontrollers/misentregas/__init__.py +++ b/sercom/subcontrollers/misentregas/__init__.py @@ -105,6 +105,8 @@ class MisEntregasController(controllers.Controller, identity.SecureResource): """Basic model admin interface""" require = identity.has_permission('entregar') + hide_to_admin = 1 + @expose() def default(self, tg_errors=None): """handle non exist urls""" @@ -125,8 +127,11 @@ class MisEntregasController(controllers.Controller, identity.SecureResource): """List records in model""" # Grupos en los que el usuario formo parte m = [i.grupo.id for i in Grupo.selectByAlumno(identity.current.user)] - entregador = AlumnoInscripto.selectByAlumno(identity.current.user) - m.append(entregador.id) + try: + entregador = AlumnoInscripto.selectByAlumno(identity.current.user) + m.append(entregador.id) + except: + pass r = cls.select(IN(cls.q.entregadorID, m)) return dict(records=r, name=name, namepl=namepl) @@ -174,7 +179,7 @@ class MisEntregasController(controllers.Controller, identity.SecureResource): @expose(template='kid:%s.templates.corrida' % __name__) def corrida(self, entregaid): - e = validate_get(id) + e = validate_get(entregaid) return dict(entrega=e) @expose()