I'm a little bit rusty on booleans, but I think from memory:
a) exactly what value is stored in the field depends on the backend, but 
the DAL always works with True and False
but b) you can also end up with NULL if you're not careful, and NULL is not 
necessarily the same as False. 
so make sure you set a sensible default value (either True or False) 



On Wednesday, 26 March 2014 11:08:40 UTC+11, Avi A wrote:
>
> Hi,
> i have a table with a boolean field:
>
> Field('f_test_is_a_clone', type='boolean',
>           label=T('Test is a clone')),
>
> And this is the query, where I don't want to return cloned tests:
>
> my_tests_list = db((db.t_tests.created_by == auth.user.id) & (not db.
> t_tests.f_test_is_a_clone)).select()
>
> but it returns empty list. 
> What should i fix?
> thanks.
>

-- 
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