Please help me to understand how to use the new syntax.  How do I have to
change the following code to work?


def rp(author):
    an =  db(db.akb_reprint.uuid==author).select(db.akb_reprint.rp_author)
    if len(an):
        a_name = an.first()['rp_author']
    else:
        a_name = 'No rp_author'
    return a_name

db.akb_articles.rp_author.represent = lambda x,record: rp(x),record

How do I define and use 'record' in this case?

The ticket says:

 db.akb_articles.rp_author.represent = lambda x,record: rp(x),record
NameError: name 'record' is not defined

Regards
Johann


-- 
 May grace and peace be yours in abundance through the full knowledge of God
and of Jesus our Lord!  His divine power has given us everything we need for
life and godliness through the full knowledge of the one who called us by
his own glory and excellence.
                                                    2 Pet. 1:2b,3a

Reply via email to