[sql] fix querying of boolean value w/ sqlite stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 27 Jul 2011 15:42:02 +0200
branchstable
changeset 7710 33636bd69faa
parent 7709 83534bb9d893
child 7712 82c84ca05d6e
[sql] fix querying of boolean value w/ sqlite
server/sources/rql2sql.py
--- a/server/sources/rql2sql.py	Wed Jul 27 14:26:13 2011 +0200
+++ b/server/sources/rql2sql.py	Wed Jul 27 15:42:02 2011 +0200
@@ -1494,6 +1494,8 @@
                     self._query_attrs[_id] = utcdatetime(value)
                 elif isinstance(value, time) and value.tzinfo is not None:
                     self._query_attrs[_id] = utctime(value)
+                elif isinstance(value, bool):
+                    return self.dbhelper.boolean_value(value)
         else:
             _id = str(id(constant)).replace('-', '', 1)
             self._query_attrs[_id] = value