I figured out what the problem is. in SQLFORM.grid
ret = db(table.id==request.args[-1]).delete()
if ondelete:
return ondelete(table,request.args[-1],ret)
the record is deleted before ondelete is called. This was for
conformity with the oncreate and onupdate
Also let me say that I was able to get around this problem - to suit
my purposes, but not those who need ondelete - originally with a hack
to .grid.
In the case in question, i don't really want to delete the item. I
want to remove it for the user in question. To do this, originally, I
added anot
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
Hello Casey, Can you show us your test?
On Nov 16, 1:14 pm, Casey Schroeder 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 reliab
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 in ondelete, i.e. before a subsequent commit? My
*
fixed
On Oct 26, 4:54 pm, Bob St John wrote:
> using 1.99.2
>
> in gluon.sqlhtml.SQLFORM.grid:
>
> line 1489: return ondelete(table,request.args[-2],ret)
>
> I think it should be: return ondelete(table,request.args[-1],ret)
>
> As it is now, ondelete gets (table, table, ret), whereas I believe i
6 matches
Mail list logo