On Monday, June 6, 2016 at 9:19:10 AM UTC-4, Mirek Zvolský wrote:
>
> Thank you, Anthony!
> For me was important to be sure that I make no other mistake and proper 
> way to fix it is with delayed setting of represent=..
>
> Based on your answer, this works excellent for me:
> db.place.place_id.represent = lambda id, row: id and id.place or ""
>

No need to set the represent attribute after the table definition (and in 
fact, if you are using lazy tables, this de-lazifies the table). It's just 
a lambda function, which doesn't get called until some later point after 
the table has been defined.
 

> (handled for None + different parameters order)
>

Oops, fixed the parameter order in the original.

Anthony

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to