I isolated the problem in gluon/dal.py (line: 79) and with this change it 
works fine in postgresql.

 
    if (field.notnull or field.unique) and not field_type in excluded_fields
:
        requires.insert(0, validators.IS_NOT_EMPTY())
    elif not field.notnull and not field.unique and requires:
        requires[0] = validators.IS_EMPTY_OR(requires[0])
        #requires[0] = validators.IS_EMPTY_OR(requires[0], null='' if field 
in ('string', 'text', 'password') else None)


Dana ponedjeljak, 2. svibnja 2016. u 19:59:26 UTC+2, korisnik Adam Filić 
napisao je:
>
> I have problem with empty field that should be inserted in db as NULL 
> (None), but 0 (zero) is inserted. Even when I declare form.vars.fo = None 
> (in validation routine), zero is inserted. Why?
>
> Dana utorak, 12. travnja 2016. u 23:29:26 UTC+2, korisnik Massimo Di 
> Pierro napisao je:
>>
>> web2py 2.14.4 is out.
>>
>> It fixes some a problem with CAS and some style issues with examples.
>> It also includes (and passes) a lot of new tests. 
>>
>> Thanks to Richard Vezina, Simone and Leonel for doing most of the work in 
>> this release.
>>
>> Massimo
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
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/d/optout.

Reply via email to