tickets: 8676
This data as json
id | created | changetime | last_pulled_from_trac | stage | status | component | type | severity | version | resolution | summary | description | owner | reporter | keywords | easy | has_patch | needs_better_patch | needs_tests | needs_docs | ui_ux |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8676 | 2008-08-29 10:24:03 | 2008-08-29 10:33:05 | 2022-03-06 03:42:52.830715 | Unreviewed | closed | Uncategorized | dev | wontfix | BooleanField says value required if False | The BooleanField should accept False values and not raise the required error. Here is a diff from the http://code.djangoproject.com/svn/django/tags/notable_moments/1.0-beta-1 branch. The problem is in trunk too. {{{ Index: django/forms/fields.py =================================================================== --- django/forms/fields.py (revision 8696) +++ django/forms/fields.py (working copy) @@ -569,9 +569,9 @@ if value == 'False': value = False else: - value = bool(value) + value = value and True or None super(BooleanField, self).clean(value) - if not value and self.required: + if value is None and self.required: raise ValidationError(self.error_messages['required']) return value }}} | nobody | dobee | forms | 0 | 1 | 0 | 0 | 0 | 0 |