google-code-export / django-forum

Automatically exported from code.google.com/p/django-forum
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

BooleanFields do not accept null values #62

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. manage.py validate

What is the expected output? What do you see instead?
got validate error
Error: One or more models did not validate:
forum.thread: "sticky": BooleanFields do not accept null values. Use a 
NullBooleanField instead.
forum.thread: "closed": BooleanFields do not accept null values. Use a 
NullBooleanField instead.

What version of the product are you using? On what operating system?
latest svn checkout

Please provide any additional information below.
the latest django\core\management\validation.py add this validation.
if isinstance(f, models.BooleanField) and getattr(f, 'null', False):
                e.add(opts, '"%s": BooleanFields do not accept null values. 
Use a NullBooleanField instead.' % f.name)

Original issue reported on code.google.com by ask...@gmail.com on 21 Apr 2009 at 3:22

GoogleCodeExporter commented 9 years ago
Duplicate of issue #59. Fixed from r42.

Original comment by rwpoul...@gmail.com on 3 May 2009 at 12:13