- values.docentes_to = [{"id":d.docente.id, "label":d.docente.shortrepr()} for d in DocenteInscripto.selectBy(curso=r.id)]
- values.alumnos_inscriptos = [{"id":a.alumno.id, "label":a.alumno.shortrepr()} for a in AlumnoInscripto.selectBy(curso=r.id)]
-
- return dict(name=name, namepl=namepl, record=values, form=form)
+ r.docentes_to = [{"id":d.docente.id, "label":d.docente.shortrepr().replace("'", "\\'")} for d in r.docentes]
+ r.alumnos_inscriptos = [{"id":a.alumno.id, "label":a.alumno.shortrepr().replace("'", "\\'")} for a in r.alumnos]
+ return dict(name=name, namepl=namepl, record=r, form=form)