X-Git-Url: https://git.llucax.com/z.facultad/75.52/sercom.git/blobdiff_plain/d6b4a2f03ca3eeeedb0db94baf4d2f507335d9ef..71a2825ae4ddb8bea25180d08bdde3bfb481e7f4:/sercom/subcontrollers/enunciado/__init__.py diff --git a/sercom/subcontrollers/enunciado/__init__.py b/sercom/subcontrollers/enunciado/__init__.py index a81c9e3..9ef523f 100644 --- a/sercom/subcontrollers/enunciado/__init__.py +++ b/sercom/subcontrollers/enunciado/__init__.py @@ -178,8 +178,8 @@ class EnunciadoController(controllers.Controller, identity.SecureResource): def edit(self, id, **kw): """Edit record in model""" r = validate_get(id) - r.tareas_fuente = [{"id":t.id, "label":t.shortrepr()} for t in filter(lambda x: isinstance(x, TareaFuente), r.tareas)] - r.tareas_prueba = [{"id":t.id, "label":t.shortrepr()} for t in filter(lambda x: isinstance(x, TareaPrueba), r.tareas)] + r.tareas_fuente = [{"id":t.id, "label":t.shortrepr()} for t in r.tareas if isinstance(t, TareaFuente)] + r.tareas_prueba = [{"id":t.id, "label":t.shortrepr()} for t in r.tareas if isinstance(x, TareaPrueba)] return dict(name=name, namepl=namepl, record=r, form=form) @validate(form=form)