Still there : Version 1.96.3 (2011-06-06 14:35:14) Richard
On Mon, Jun 6, 2011 at 3:49 PM, Richard Vézina <ml.richard.vez...@gmail.com>wrote: > It does the problem on update... My create form work well, deletion also > works. > > Richard > > > On Mon, Jun 6, 2011 at 3:29 PM, Richard Vézina < > ml.richard.vez...@gmail.com> wrote: > >> Nop! Still there... >> >> Maybe I have wrong build : >> Version 1.96.3 (2011-06-06 13:58:28) >> >> Richard >> >> >> On Mon, Jun 6, 2011 at 3:04 PM, Massimo Di Pierro < >> massimo.dipie...@gmail.com> wrote: >> >>> I think I fixed this in trunk. Can you please check it? >>> >>> On Jun 6, 1:03 pm, Richard Vézina <ml.richard.vez...@gmail.com> wrote: >>> > Hello, >>> > >>> > I just try my app with the 1.96.3 and I got a strange error : >>> > >>> > Traceback (most recent call last): >>> > File "/version_196-3/web2py/gluon/restricted.py", line 184, in >>> restricted >>> > exec ccode in environment >>> > File "/version_196-3/web2py/applications/sgddms/controllers/test.py", >>> line >>> > 1334, in <module> >>> > File "/version_196-3/web2py/gluon/globals.py", line 137, in <lambda> >>> > self._caller = lambda f: f() >>> > File "/version_196-3/web2py/gluon/tools.py", line 2452, in f >>> > return action(*a, **b) >>> > File "/version_196-3/web2py/applications/sgddms/controllers/test.py", >>> line >>> > 654, in verify >>> > if form.accepts(request.vars, session): >>> > File "/version_196-3/web2py/gluon/sqlhtml.py", line 1203, in accepts >>> > self.table._db(self.table.id == self.record.id).update(**fields) >>> > File "/version_196-3/web2py/gluon/dal.py", line 5369, in update >>> > fields = self.db[tablename]._listify(update_fields,update=True) >>> > File "/version_196-3/web2py/gluon/dal.py", line 4656, in _listify >>> > raise SyntaxError, 'Field %s does not belong to the table' % name >>> > SyntaxError: Field id does not belong to the table >>> > >>> > def _listify(self,fields,update=False): >>> > new_fields = [] >>> > new_fields_names = [] >>> > for name in fields: >>> > if not name in self.fields: >>> > raise SyntaxError, 'Field %s does not belong to the >>> > table' % name >>> > >>> > new_fields.append((self[name],fields[name])) >>> > new_fields_names.append(name) >>> > for ofield in self: >>> > if not ofield.name in new_fields_names: >>> > >>> > *I use a old app and a feature for Postgres that Massimo added in the >>> > pass that never been documented and i don't think it was official :* >>> > >>> > * >>> > * >>> > >>> > *MODEL :* >>> > >>> > *Field('table_id','id'), # My legacy database used the same name as PK >>> > and FK so I had to define them in the model like this* >>> > >>> > *sequence_name='test_activity_activity_id_seq' # Postgres has it on >>> > automation rule to create the sequence name base on the PK name and >>> > because I where using legacy database PK name I had also to define the >>> > sequence name in my model...* >>> > >>> > * >>> > * >>> > >>> > *Not sure if there is a link.* >>> > >>> > * >>> > * >>> > >>> > *Thanks* >>> > >>> > * >>> > * >>> > >>> > *Richard* >>> > >>> > * >>> > * >>> > >>> > * >>> > * >> >> >> >