Is "row['connection_id']" an id field?

Richard

On Mon, Apr 23, 2012 at 9:44 AM, Manuele Pesenti
<[email protected]>wrote:

> This field definition seams to be a problem for postgres but not for
> sqlite. Can somebody tell me why?
>
> Field('connection_name', required=True, compute=lambda row:
> db.plugin_lookout_connections[**row['connection_id']].alias)
>
> This is the error I get using postgres:
>
> Traceback (most recent call last):
>  File "/home/manuele/Dropbox/**sviluppo/web2py-1.99.7/gluon/**restricted.py",
> line 205, in restricted
>    exec ccode in environment
>  File "/home/manuele/Dropbox/**sviluppo/web2py-1.99.7/**
> applications/theseus/**controllers/plugin_lookout.py"**, line 663, in
> <module>
>  File "/home/manuele/Dropbox/**sviluppo/web2py-1.99.7/gluon/**globals.py",
> line 173, in <lambda>
>    self._caller = lambda f: f()
>  File "/home/manuele/Dropbox/**sviluppo/web2py-1.99.7/gluon/**tools.py",
> line 2575, in f
>    return action(*a, **b)
>  File "/home/manuele/Dropbox/**sviluppo/web2py-1.99.7/**
> applications/theseus/**controllers/plugin_lookout.py"**, line 202, in
> plugin_lookout_tables
>    constraints = dict(plugin_lookout_tables=**table_set) #
> get_data_with_permissions('**plugin_lookout_tables')
>  File "/home/manuele/Dropbox/**sviluppo/web2py-1.99.7/gluon/**sqlhtml.py",
> line 1989, in smartgrid
>    user_signature=user_signature,****kwargs)
>  File "/home/manuele/Dropbox/**sviluppo/web2py-1.99.7/gluon/**sqlhtml.py",
> line 1568, in grid
>    formname=formname)
>  File "/home/manuele/Dropbox/**sviluppo/web2py-1.99.7/gluon/**html.py",
> line 1994, in process
>    self.validate(**kwargs)
>  File "/home/manuele/Dropbox/**sviluppo/web2py-1.99.7/gluon/**html.py",
> line 1941, in validate
>    if self.accepts(**kwargs):
>  File "/home/manuele/Dropbox/**sviluppo/web2py-1.99.7/gluon/**sqlhtml.py",
> line 1274, in accepts
>    self.vars.id = self.table.insert(**fields)
>  File "/home/manuele/Dropbox/**sviluppo/web2py-1.99.7/gluon/**dal.py",
> line 6829, in insert
>    return self._db._adapter.insert(self,**self._listify(fields))
>  File "/home/manuele/Dropbox/**sviluppo/web2py-1.99.7/gluon/**dal.py",
> line 928, in insert
>    raise e
> InternalError: current transaction is aborted, commands ignored until end
> of transaction block
>

Reply via email to