Yea, he should probably override the equality operator to allow F (not just 0 or False). :D
On Thursday, October 17, 2013 11:53:24 AM UTC-7, Niphlod wrote: > > don't do that, please. If you're annoyed with web2py's defaults, you can > easily sublass the adapter and make your own adjustments. > > On Thursday, October 17, 2013 7:29:10 PM UTC+2, Derek wrote: >> >> Since you are using Python 2.x you can redefine 'False' to be 'F' if you >> wish, although I'm sure you'd have some side effects somewhere else in the >> system. In Python 3.x you can't do that. >> >> On Wednesday, October 16, 2013 8:49:26 PM UTC-7, Tim Richardson wrote: >>> >>> >>> >>> On Thursday, 17 October 2013 14:29:17 UTC+11, Tim Richardson wrote: >>>> >>>> This is web2py 2.7.4, on Windows, python 2.7.5 >>>> >>>> I have rows in an sqlite table with a boolean field. Currently all rows >>>> have this field set to 0 (via an update query in an sqlite console) >>>> >>>> When the table is defined in the web2py model as boolean, this query >>>> returns no rows: >>>> >>>> query_rows = db(db.order_status.sent_order_rcvd_email == >>>> False).select() >>>> >>>> but if the table definition changes the field type to integer, >>>> the query works. >>>> >>>> Seems a bit weird. I thought I would have run into this problem earlier >>>> unless it is recent behaviour. >>>> >>>> >>> Ah. A bit of a gotcha perhaps. sqlite defines boolean as an integer >>> value (0 or 1) but web2py uses a 1 char 'T' or 'F'. >>> >> -- 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/groups/opt_out.