In my db.py I have a table definition with this field:
SQLField("foto","upload",label="Foto")
I can insert and edit the table with the generated t2 forms, but when
I try to delete a record that have an empty upload field, it fails
#edit function
def editar_hacker():
form=t2.update(db.hackers,next='hk_hackers')
return dict(form=form)
Traceback (most recent call last):
File "/desa/web2py/gluon/restricted.py", line 62, in restricted
exec ccode in environment
File "/desa/web2py/applications/siresein/controllers/hacking.py",
line 82, in <module>
File "/desa/web2py/gluon/globals.py", line 55, in <lambda>
self._caller=lambda f: f()
File "/desa/web2py/applications/plugin_t2/modules/t2.py", line 1039,
in h
return f(*a,**b)
File "/desa/web2py/applications/siresein/controllers/hacking.py",
line 45, in editar_hacker
form=t2.update(db.hackers,next='hk_hackers')
File "/desa/web2py/applications/plugin_t2/modules/t2.py", line 469,
in update
if os.path.exists(name): os.unlink(name)
OSError: [Errno 21] Is a directory: '/desa/web2py/applications/
siresein/uploads/'
If I edit the field and upload a file, save, then delete the record,
it works...
Mauricio
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---