From: Ricardo Markiewicz Date: Sat, 10 Mar 2007 18:40:59 +0000 (+0000) Subject: Agrego rol cuando creo un nuevo Alumno X-Git-Tag: 0_9~91 X-Git-Url: https://git.llucax.com/software/sercom.git/commitdiff_plain/f4b113dc75fa5ca3fcd334787c07972377c6bb1b?ds=inline Agrego rol cuando creo un nuevo Alumno --- diff --git a/sercom/subcontrollers/alumno/__init__.py b/sercom/subcontrollers/alumno/__init__.py index 155c781..72dd9c4 100644 --- a/sercom/subcontrollers/alumno/__init__.py +++ b/sercom/subcontrollers/alumno/__init__.py @@ -157,6 +157,7 @@ class AlumnoController(controllers.Controller, identity.SecureResource): lines = archivo.file.read().split('\n') ok = [] fail = [] + entregador = Rol.get(2) for line in lines: for row in csv.reader([line]): if row == []: @@ -167,6 +168,7 @@ class AlumnoController(controllers.Controller, identity.SecureResource): u.telefono = row[3] u.contrasenia = row[0] u.activo = True + u.add_rol(entregador) ok.append(row) except Exception, e: row.append(str(e))