Thanks Massimo,

I am trying this:

    delmem = lambda table, itid, ct:
auth.del_membership(auth.id_group("auth_group_1"),
table[int(itid)].userid)

SQLFORM.grid(...ondelete=delmem...)

table[int(itid)] however, is returning a none type, so the userid is
inaccessible in this way.  An exception is thrown and caught, and the
db rolls back the delete (all in local SQLite).

The _dict_ of the table appears empty and I have not been able to find
where in the table the data is buried if at all.  Running the relevant
select itself returns nothing - i made the above mentioned change
manually, but it appears the same as that in mercurial.

Thanks

On Nov 17, 7:52 am, Massimo Di Pierro <massimo.dipie...@gmail.com>
wrote:
> Hello Casey, Can you show us your test?
>
> On Nov 16, 1:14 pm, Casey Schroeder <vizqu...@gmail.com> wrote:
>
>
>
>
>
>
>
> > There may be an update on this that i missed, but can I ask if this
> > fix is sufficient?
>
> > I believe that the ret parameter is the effected row count, correct?
>
> > If you just deleted the record, can you reliably retrieve it from the
> > table and record id inondelete, i.e. before a subsequent commit?  My
> > *small* test say it doesn't work.
>
> > Is there a way to get the record itself instead?  Or am i missing this
> > somewhere?
>
> > Thanks
>
> > On Oct 27, 6:46 pm, Massimo Di Pierro <massimo.dipie...@gmail.com>
> > wrote:
>
> > > fixed
>
> > > On Oct 26, 4:54 pm, Bob St John <bobinco...@gmail.com> wrote:
>
> > > > using 1.99.2
>
> > > > in gluon.sqlhtml.SQLFORM.grid:
>
> > > > line 1489: returnondelete(table,request.args[-2],ret)
>
> > > > I think it should be: returnondelete(table,request.args[-1],ret)
>
> > > > As it is now,ondeletegets (table, table, ret), whereas I believe it
> > > > should get (table, record_id, ret) to work properly...
>
> > > > I like thisgridmethod!

Reply via email to