Thanks
Where did you get it from ?
On Wednesday, July 18, 2018 at 2:57:41 PM UTC+2, icodk wrote:
>
> I have the flowing two field definitions:
> Field('code_1', default='', label=T("Code 1"),
> requires=[IS_EMPTY_OR(IS_NOT_IN_DB(db,
> 'product.code_1',error_message=T('Code 1 already in
> use'),ignore_common_filters=False)),IS_LENGTH(maxsize=15)]),
> Field('code_2', default='',label=T("Code 2")),
>
> However when both are empty on a form , code_1 is saved as null but code_2
> saved as ' ' in the database (PostgreSQL)
> So
> db(db.product.code_1==' ')
>
> gives different results then
>
> db(db.product.code_2==' ')
>
> How do I get an empty string ' ' also for code_1 in db ?
>
>
>
--
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.