michiya / django-pyodbc-azure

Django backend for Microsoft SQL Server and Azure SQL Database using pyodbc
https://pypi.python.org/pypi/django-pyodbc-azure
BSD 3-Clause "New" or "Revised" License
321 stars 140 forks source link

Add a converter for boolean values #195

Open marcogiusti opened 5 years ago

marcogiusti commented 5 years ago

If a numeric column (tinyint in my case) is mapped as a BooleanField, Django sometime report a wrong value that is always True. This because it checks for the type (...value is False...). The driver should handle this case and convert from a numeric value to a boolean.

OskarPersson commented 5 years ago

This is hopefully fixed in https://github.com/ESSolutions/django-mssql-backend/pull/17