It is just internal logic, creating some objects in several places. The point is that usually row.email was evaluating to a string, and I was using that to setup my objects. Now it is evaluating to (when showing with %s):
(<gluon.dal.Field object at 0x9ea7b8c>, '[email protected]') And this problem seems to be new in trunk. As I say, my other box running Version 2.00.0 (2012-07-01 22:43:58) dev has no issues. On Wednesday, August 29, 2012 9:56:14 PM UTC+2, Anthony wrote: > > What happens with "email" variable in the rest of that function? What does > the function return? > > Anthony > > On Wednesday, August 29, 2012 3:19:59 PM UTC-4, Daniel Gonzalez wrote: >> >> # Use the authorization table for users >> web2py_user_table = auth.settings.table_user_name >> db.define_table( >> web2py_user_table, >> Field('email', unique=True), >> Field('wav_user_doc_id', length=128, compute=create_new_wav_user >> ), >> Field('password', length=512, compute=automatic_password,type >> ='password', readable=False, label='Password'), >> # These fields are needed for authorization >> Field('registration_key', length=512, writable=False, readable= >> False, default=''), >> Field('reset_password_key', length=512, writable=False, readable= >> False, default=''), >> Field('registration_id', length=512, writable=False, readable= >> False, default=''), >> format = '%(email)s') >> >> and >> >> def create_new_wav_user(row): >> log.info('row=%s' % (row)) >> try: >> email = row['email'] >> except: >> log.error('No email provided, row=%s' % (row)) >> return None >> ... >> ... >> >> I have tried both: email = row['email'] and email = row.email >> >> On Wednesday, August 29, 2012 9:12:10 PM UTC+2, rochacbruno wrote: >>> >>> can you show the code? >>> >>> I am using >>> >>> db.table.field.compute = lambda row: row.otherfield >>> >>> >>> >>> On Wed, Aug 29, 2012 at 4:09 PM, Daniel Gonzalez <[email protected]>wrote: >>> >>>> Hi, >>>> >>>> I have recently updated trunk. >>>> >>>> I am using a compute function when creating new entries. In the compute >>>> function I access the field row.email. Previously this was giving me the >>>> *value* of the field, now I just get a reference to "gluon.dal.Field". >>>> >>>> Is this expected? How can I access the value of the field? >>>> >>>> Thanks, >>>> Daniel >>>> >>>> -- >>>> >>>> >>>> >>>> >>> >>> >>> --

