Opened 12 years ago
Closed 12 years ago
#20103 closed Uncategorized (duplicate)
None no longer matches zero-length string on CharField
Reported by: | Simon Litchfield | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | 1.5 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
I've just updated from 1.5 stable to latest commit aaec4f2bd8a63b3dceebad7804c5897e7874833d.
Model.objects.filter(mycharfield=None)
used to return instances where mycharfield is actually a zero-length string.
Now, it seems I need to explicitly specify Model.objects.filter(mycharfield='')
Minor change, but the implications could be pretty severe for some apps.
Suggest either reverting to previous behaviour or updating the "backwards incompatible changes" list.
Note:
See TracTickets
for help on using tickets.
Dupe of #20102.