Thank you, I've fixed it with:
 actividad_id=actividad[0].id
 riesgo_id=riesgo[0].id

On 15 ene, 12:45, Massimo Di Pierro <massimo.dipie...@gmail.com>
wrote:
> perhaps
>
> (db.actividades_riesgos.riesgos==riesgo)
>
> should be
>
> (db.actividades_riesgos.riesgos==riesgo.first().id)
>
> On Jan 15, 5:24 am, luifran <lbernalhernan...@yahoo.es> wrote:
>
>
>
>
>
>
>
> > db.define_table('actividades_riesgos',Field('actividades',db.actividades),F 
> > ield('riesgos',db.riesgos))
>
> > actividad=db(db.actividades.nombre==request.args(0)).select(db.actividades.
> > id)
> > riesgo=db(db.riesgos.nombre==request.args(1)).select(db.riesgos.id)
> > record = db((db.actividades_riesgos.actividades==actividad) &
> > (db.actividades_riesgos.riesgos==riesgo)).select().first()
>
> > The last line show the next error:
> > TypeError: int() argument must be a string or a number, not 'Rows' //

Reply via email to