Hi, 

I look at example:
http://www.web2py.com/book/default/chapter/06#before-and-after-callbacks

how can I find out what is the value of person.id from the set without 
select?
(<Set (person.id = 1)>,)

as I tried:
s.select(..)[0]   # it worked for update
but got 

Traceback (most recent call last):
  File "/home/nijole/Downloads/EasyVet/web2py/gluon/restricted.py", line 212, 
in restricted
    exec ccode in environment
  File 
"/home/nijole/Downloads/EasyVet/web2py/applications/apskaitele/controllers/appadmin.py"
 <http://localhost:8000/admin/default/edit/apskaitele/controllers/appadmin.py>, 
line 569, in <module>
  File "/home/nijole/Downloads/EasyVet/web2py/gluon/globals.py", line 194, in 
<lambda>
    self._caller = lambda f: f()
  File 
"/home/nijole/Downloads/EasyVet/web2py/applications/apskaitele/controllers/appadmin.py"
 <http://localhost:8000/admin/default/edit/apskaitele/controllers/appadmin.py>, 
line 304, in update
    if form.accepts(request.vars, session):
  File "/home/nijole/Downloads/EasyVet/web2py/gluon/sqlhtml.py", line 1398, in 
accepts
    self.table._db(qry).delete()
  File "/home/nijole/Downloads/EasyVet/web2py/gluon/dal.py", line 9821, in 
delete
    ret and [f(self) for f in table._after_delete]
  File 
"/home/nijole/Downloads/EasyVet/web2py/applications/apskaitele/models/db.py" 
<http://localhost:8000/admin/default/edit/apskaitele/models/db.py>, line 329, 
in <lambda>
    db.Pardavimai._after_delete.append( lambda s: 
update_SandelioProduktai_likutis_from_Pardavimai(s.select(db.Pardavimai.sandelio_produktas)[0])
 )
  File "/home/nijole/Downloads/EasyVet/web2py/gluon/dal.py", line 10075, in 
__getitem__
    row = self.records[i]
IndexError: list index out of range



-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to