          elif internal_type == 'DecimalField':
              converters.append(self.convert_decimalfield_value)
          elif internal_type == 'UUIDField':
              converters.append(self.convert_uuidfield_value)
          return converters
  
      def convert_datetimefield_value(self, value, expression, connection, context):
          if value is not None:
              if not isinstance(value, datetime.datetime):
                  value = parse_datetime(value)
 
</s> remove     IntegerField, Q, Sum, Value,
 </s> add     IntegerField, NullBooleanField, Q, Sum, Value,
        elif internal_type in ('NullBooleanField', 'BooleanField'):
            converters.append(self.convert_booleanfield_value)
          elif internal_type == 'DecimalField':
              converters.append(self.convert_decimalfield_value)
          elif internal_type == 'UUIDField':
              converters.append(self.convert_uuidfield_value)
        elif internal_type in ('NullBooleanField', 'BooleanField'):
            converters.append(self.convert_booleanfield_value)
          return converters
  
      def convert_datetimefield_value(self, value, expression, connection, context):
          if value is not None:
              if not isinstance(value, datetime.datetime):
                  value = parse_datetime(value)
keep keep keep add keep keep keep keep keep keep
 Fixed #27481 -- Made SQLite return annotated boolean values as boolean, not integer.

Thanks Simon Charette for review. 
django/db/backends/sqlite3/operations.py