﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
23216	"CheckboxInput does not work properly with value ""0"""	maciej.pawlisz@…	nobody	"I loaded data to my local sqlite database from mysql database using modified mysqldump script. All boolean fields are now stored with ""0"" and ""1"" instead of ""True"" and ""False"" - sqlite datatype is tinyint instead of bool, which is not present in mysql.
Now checkboxes are always checked because of this function which does not work with 0 and 1
{{{
django.forms.widgets.py:457
def boolean_check(v):
    return not (v is False or v is None or v == '')
}}}
Also {{{BooleanField.to_python()}}} method is not called (which would properly convert this value to Boolean), only {{{Field.prepare_value}}} which does nothing

Because of this bug all users seem to be superusers in django admin.


"	Bug	closed	Forms	1.6	Normal	worksforme			Unreviewed	0	0	0	0	0	0
