fields should be

fields=['friendship.id', 'friendship.to_user'],

On Aug 25, 1:28 am, firedragon852 <[email protected]> wrote:
> If I do this:
> db.friendship.to_user.represent = lambda id: db.auth_user[id].nickname
> friends = crud.select(db.friendship, db.friendship.from_user ==
> auth.user.id,
>                           fields=['id', 'to_user'],
>                           headers={'id':T('ID'),
> 'to_user':T('Friend')})
>
> to_user.represent never shows the nicknames.
>
> If I change the crud.select statement to:
> friends = crud.select(db.friendship, db.friendship.from_user ==
> auth.user.id)
>
> to_user.represent shows the nicknames.
>
> Is this a bug?

Reply via email to