What happen if you remove required=True, maybe you have some miss match and lambda return None sometimes??
Or you may try that first... This result into a table : row['connection_id'] It should be row['connection_id'].id... Richard On Mon, Apr 23, 2012 at 10:11 AM, Manuele Pesenti <[email protected] > wrote: > Il 23/04/2012 16:01, Richard Vézina ha scritto: > > Is "row['connection_id']" an id field? >> > > off course... this is the complete model for the table: > > db.define_table('plugin_**lookout_tables', > Field('table_name', label=T('Table name'), required=True, > ondelete='CASCADE' > ), > Field('table_migrate', 'boolean', > compute = lambda row: not (db_got_table(globals()[db\ > .plugin_lookout_connections[**row['connection_id']]\ > .alias], row['table_name'])[0] or row['is_view'])), > Field('table_singular', label=T('Singular')), > Field('table_plural', label=T('Plural')), > Field('restricted', 'boolean', default=False), > Field('is_active', 'boolean', default=True, label=T('Active'), > comment=T('Let the table be recognized from db?')), > Field('is_view', 'boolean', label=T('View'), default=False, > writable=False, readable=True), > Field('connection_id', 'reference plugin_lookout_connections', > required=True, > requires = IS_IN_DB(db(db.plugin_lookout_** > connections.created_by==auth.**user_id), 'plugin_lookout_connections.id**', > '%(alias)s: %(dsn)s') > ), > > Field('connection_name', required=True, > compute=lambda row: db.plugin_lookout_connections[** > row['connection_id']].alias > ), > auth.signature.created_by, > singular=T('Table'), plural=T('Tables'), > format='%(table_name)s' > ) > > > > >> Richard >> > >

