burke-software/django-report-builder — pull request #68 by synotna (2013-08-29 13:11:50+00:00)
Title: Update models.py

By default, creating a new report leaves distinct undefined, which raises the error:

Exception Value:
null value in column "distinct" violates not-null constraint

/home/bi/py/django-trunk/django/db/backends/util.py in execute
return self.cursor.execute(sql, params) ...
▼ Local vars
Variable	Value
self

stop
1377780536.875915
start
1377780536.874902
params
(u'test', u'test', u'', 15, u'2013-08-29', u'2013-08-29', 1, 1, None)
sql
u'INSERT INTO "report_builder_report" ("name", "slug", "description", "root_model_id", "created", "modified", "user_created_id", "user_modified_id", "distinct") VALUES (\'test\', \'test\', \'\', 15, \'2013-08-29\', \'2013-08-29\', 1, 1, NULL) RETURNING "report_builder_report"."id"'
duration
0.001013040542602539

Which is fixed following:

https://docs.djangoproject.com/en/dev/ref/models/fields/#booleanfield
If you need to accept null values then use NullBooleanField instead.