Closed alfonsodg closed 10 years ago
From mulone.m...@gmail.com on December 17, 2010 15:55:19
From web2py from trunk I have this code
==============BEGIN CODE ========================== db.define_table('problematic', Field('id', 'id'), Field('myfield','string',default=""), Field('myfield2','string',default="") ) problematic = db(db.problematic.id>0).select() if not problematic: someid = db.problematic.insert(myfield="")
lastinserted = db(db.problematic.id>0).select()[0] print lastinserted.myfield print lastinserted.myfield2 ==============END CODE ==========================
the second print return None when have to return "".
Attachment: web2py.app.problemdefault.w2p
Original issue: http://code.google.com/p/web2py/issues/detail?id=137
From massimod...@gmail.com on December 18, 2010 21:07:34
Status: Fixed
From mulone.m...@gmail.com on December 17, 2010 15:55:19
From web2py from trunk I have this code
==============BEGIN CODE ========================== db.define_table('problematic', Field('id', 'id'), Field('myfield','string',default=""), Field('myfield2','string',default="") ) problematic = db(db.problematic.id>0).select()
if not problematic: someid = db.problematic.insert(myfield="")
lastinserted = db(db.problematic.id>0).select()[0] print lastinserted.myfield print lastinserted.myfield2 ==============END CODE ==========================
the second print return None when have to return "".
Attachment: web2py.app.problemdefault.w2p
Original issue: http://code.google.com/p/web2py/issues/detail?id=137