X-Git-Url: https://git.llucax.com/z.facultad/75.52/sercom.git/blobdiff_plain/74e5b5ea98703dac1f5871568c251645e1560748..af3a959636b1e6954c1a66d15c614388cb9a9715:/sercom/subcontrollers/alumno/__init__.py diff --git a/sercom/subcontrollers/alumno/__init__.py b/sercom/subcontrollers/alumno/__init__.py index 2eb418f..7dd7f01 100644 --- a/sercom/subcontrollers/alumno/__init__.py +++ b/sercom/subcontrollers/alumno/__init__.py @@ -107,6 +107,7 @@ class AlumnoController(controllers.Controller, identity.SecureResource): @expose() def create(self, **kw): """Save or create record to model""" + kw['roles'] = [Rol.by_nombre('alumno')] validate_new(kw) flash(_(u'Se creó un nuevo %s.') % name) raise redirect('list') @@ -163,7 +164,7 @@ class AlumnoController(controllers.Controller, identity.SecureResource): if row == []: continue try: - u = Alumno(row[0], nombre=row[1]) + u = Alumno(row[0], nombre=row[1], roles=[Rol.by_nombre('alumno')]) u.email = row[2] u.telefono = row[3] u.password = row[0]