You should try .. & (db.t_tests.f_test_is_a_clone == False)
that is how built-in is_active boolean works. For additional debugging learning - try printing db._lastsql after your query. It will show you "raw" query - It helps narrow down the problem -Mandar On Wednesday, March 26, 2014 5:38:40 AM UTC+5:30, 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.