Opened 10 years ago
Closed 10 years ago
#23765 closed Cleanup/optimization (fixed)
Get rid of system check 1_6.W002
Reported by: | Kevin Christopher Henry | Owned by: | nobody |
---|---|---|---|
Component: | Core (System checks) | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
System check 1_6.W001
was recently removed (#23469); 1_6.W002
has the same problems, and more, so I propose it be removed as well.
There is a serious false positive problem here (where I define a false positive as something that makes you take time to think and care about something you don't need to think or care about). For this warning to actually help you, you must meet the following conditions: you haven't read the release notes; you're upgrading from a pre-1.6 version; you're using BooleanFields
without a default; and you're nevertheless relying on the default value to be False
. I don't have any hard numbers, of course, but I suspect this represents a small and dwindling proportion of users.
Another problem with this is that the most straightforward solution (and the one hinted at by the warning message) is to go around and add defaults to all your BooleanFields
. That is, in general, a mistake. Unless you actually want there to be a default, adding one harms your ability to detect bugs through model and form validation.
Since 1_6.W001
is being removed in 1.8, that seems reasonable here as well. In both cases, though, it seems like these warnings should have been added to the SILENCED_SYSTEM_CHECKS
setting in the default project template for new projects. That could certainly be done in the next 1.7 release.
Change History (2)
comment:1 by , 10 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I originally proposed the idea for this check because I was bitten by it a few times while upgrading. I still want all of my website to have a default value, but I agree that it is now more safe to remove this.