kapilratnani / django_hana

[Discontinued] Django db backend for SAP HANA
BSD 3-Clause "New" or "Revised" License
20 stars 13 forks source link

ModelForms always rendering Enabled Checkbox for Boolean fields, even when value is 0 #18

Closed gtie closed 11 years ago

gtie commented 11 years ago

The problem is that in newer vesions of Django ModelForms fail to work with 0/1 as the BooleanField values. The admin, for example, always renders enabled checkboxes for BooleanFields, even when the value is 0.

Other backends have shown the same problems, see https://code.djangoproject.com/ticket/15169

The fix is to convert 0/1 to True/False in the backend. I ported the gis.mysql fix to Hana, pull request incoming.