replace min(r['tags']) with min((int(x) for x in r['tags'])) looks like you have lists of strings instead of lists of integer references. Which web2py version are you using?
Massimo On Mar 23, 9:29 am, goutham v <[email protected]> wrote: > Please look at the attachment. for DB screenshot > > in db.py contents of define_table > Field('tags','list:reference tags'), > Field('refval','string', compute=lambda r:r['tags']), > Field('min_tag_id','integer', compute=lambda r:min(r['tags'])), > Field('max_tag_id','integer', compute=lambda r:max(r['tags'])), > > the min and max computation dose not work as expected ... the third row in > db in because of a small change for debug > > line 2 of above code is changed as > Field('refval','string', compute=lambda r:type(r['tags']) ), > > so even though the type of r['tags'] is list the min and max is not working > properly ... *any idea y?* > > Capture.JPG > 17KViewDownload

