X-Git-Url: https://git.llucax.com/software/sercom.git/blobdiff_plain/d6b4a2f03ca3eeeedb0db94baf4d2f507335d9ef..0fbdf8f839cb6b3025ef819bc8afe9dd04844584:/sercom/subcontrollers/enunciado/__init__.py?ds=sidebyside 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)