Massimo,
if record:
doesn't work because the statement should be true if the query doesn't
return any result.
if not record:
results in the following error ticket:
Traceback (most recent call last):
File "/Library/Python/2.5/site-packages/mockpy/gluon/restricted.py",
line 98, in restricted
File "/Users/iannet/mockpy/applications/mock/controllers/crud.py",
line 41, in <module>
File "/Library/Python/2.5/site-packages/mockpy/gluon/globals.py",
line 75, in <lambda>
File "/Users/iannet/mockpy/gluon/tools.py", line 1049, in f
return action(*a, **b)
File "/Users/iannet/mockpy/applications/mock/controllers/crud.py",
line 28, in update_address
record=db(db.adres.id==record_id).select(db.adres.bedrijf)[0]
File "/Library/Python/2.5/site-packages/mockpy/gluon/sql.py", line
2109, in __getitem__
SyntaxError: SQLRows: no such row
Kind regards,
Annet.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---