Code

Ticket #17796: aggtype.patch

File aggtype.patch, 649 bytes (added by adsva, 2 years ago)
  • django/db/backends/mysql/base.py

    diff --git a/django/db/backends/mysql/base.py b/django/db/backends/mysql/base.py
    index 5ad7b89..751526a 100644
    a b class DatabaseOperations(BaseDatabaseOperations): 
    194194        if (field and field.get_internal_type() in ("BooleanField", "NullBooleanField") and 
    195195            value in (0, 1)): 
    196196            value = bool(value) 
    197         return value 
     197        return super(DatabaseOperations, self).convert_values(value, field) 
    198198 
    199199    def date_extract_sql(self, lookup_type, field_name): 
    200200        # http://dev.mysql.com/doc/mysql/en/date-and-time-functions.html