{"issue":{"created_at":"2011-12-09T19:57:28Z","state":"open","updated_at":"2011-12-09T21:06:09Z","comments":1,"user":{"gravatar_id":"50cf52b92d88676be9de8afed42f1f45","id":1159834,"url":"https://api.github.com/users/mgom","avatar_url":"https://secure.gravatar.com/avatar/50cf52b92d88676be9de8afed42f1f45?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"mgom"},"body":"hi\r\n\r\nin backends, there is the following statement : \r\n\r\n# Do not check any further if user is not active\r\nif user_obj.is_active is not True:\r\n    return False\r\n\r\nIt can fail because in mysql, boolean is stored with values 0 or 1, so for example is_active can be stetted to 1 and thus, In this case, it is not considered as True\r\nI change it by  \"if not user_obj.is_active:\"\r\n\r\nBut I don't know if there is a specific and good reason to do check with True....\r\n\r\n\r\n","assignee":null,"id":2506011,"labels":[],"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"number":56,"title":"if user_obj.is_active is not True:    can fail","html_url":"https://github.com/lukaszb/django-guardian/issues/56","closed_at":null,"url":"https://api.github.com/repos/lukaszb/django-guardian/issues/56","milestone":null},"action":"created","comment":{"created_at":"2011-12-09T21:06:09Z","updated_at":"2011-12-09T21:06:09Z","user":{"gravatar_id":"e9713ac84ec5002229dc81eba8cd5c37","id":190381,"url":"https://api.github.com/users/lukaszb","avatar_url":"https://secure.gravatar.com/avatar/e9713ac84ec5002229dc81eba8cd5c37?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"lukaszb"},"body":"Well, integer values for boolean field with MySQL were there until Django 1.2 (see https://docs.djangoproject.com/en/dev/ref/databases/#boolean-fields). django-guardian supports Django 1.2+ - that's why you have problem there. I'm really not sure about other parts of the code.\r\n\r\nNevertheless, I've updated part you've specified. If it's ok, please close this issue.","id":3085922,"url":"https://api.github.com/repos/lukaszb/django-guardian/issues/comments/3085922"}}