ibmdb / python-ibmdb-django

IBM DB2 Driver for the Django application Framework
Apache License 2.0
29 stars 42 forks source link

Added integer to boolean converter for BooleanFields and NullBooleanF… #34

Closed chsymann closed 3 years ago

chsymann commented 6 years ago

Bugfix for issue https://github.com/ibmdb/python-ibmdb-django/issues/33

I tested this changes with the following test-environments:

Django==1.7
ibm-db==2.0.8
ibm-db-django==1.2.0.0

Django==1.11.13
ibm-db==2.0.8
ibm-db-django==1.2.0.0

Using the test-script provided in the issue I'm now receiving the desired booleans in the response.

Check memory-objects:
written: 0, read: 0
written: False, read: False
written: 1, read: 1
written: True, read: True

Check objects refreshed from database:
written: 0, read: False
written: False, read: False
written: 1, read: True
written: True, read: True
bimalkjha commented 3 years ago

Suggested change has been incorporated in previous commits.