Fixed in trunk! Thanks for reporting the problem.
On Aug 24, 8:16 pm, Jose <jjac...@gmail.com> wrote:
> Version: 1.66.2
> Rev: 1187 (svn)
>
> Model:
>
> db.define_table('unatabla',
> Field('nombre'),
> Field('foto', 'upload')
> )
> db.unatabla.foto.requires = IS_NULL_OR(IS_IMAGE(maxsize=(600, 400)))
>
> Hi,
>
> The combination IS_NULL_OR (IS_IMAGE (maxsize=(600, 400))) does not
> work.
> If the field "upload" is empty a mistake is produced:
>
> Traceback (most recent call last):
> File "/usr/home/jose/web2py/gluon/restricted.py", line 178, in
> restricted
> exec ccode in environment
> File "/usr/home/jose/web2py/applications/prueba/controllers/
> appadmin.py", line 255, in <module>
> File "/usr/home/jose/web2py/gluon/globals.py", line 101, in <lambda>
> self._caller = lambda f: f()
> File "/usr/home/jose/web2py/applications/prueba/controllers/
> appadmin.py", line 104, in insert
> if form.accepts(request.vars, session):
> File "/usr/home/jose/web2py/gluon/sqlhtml.py", line 817, in accepts
> (source_file, original_filename) = (f.file, f.filename)
> AttributeError: 'NoneType' object has no attribute 'file'
>
> Jose
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to
web2py+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---