It *almost* works using:

db.dog.sire_id.represent = lambda sire_id, row: db(db.dog.id==sire_id).select(db.dog.name)

However that brings back a header 'dog.name' that mucks up the appearance of the form. What I wanted to write was:

db.dog.sire_id.represent = lambda sire_id, row: db.dog(sire_id).name if sire_id != None else None

However that produces:

AttributeError: 'NoneType' object has no attribute 'name'

Which stumps me I must say, since I can clearly see a 'name:' entry displayed if I just leave off the '.name' in the code above...


Any suggestions welcome

regards

Mark


On 05/02/12 13:24, Mark Kirkwood wrote:
I see that this has been noted as an issue here:

http://code.google.com/p/web2py/issues/detail?id=382

I am using 1.99.4, anything I can try?


Reply via email to