Opened 4 years ago

Closed 4 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


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.

Change History (1)

comment:1 Changed 4 years ago by Simon Charette

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Resolution: duplicate
Status: newclosed

Dupe of #20102.

Note: See TracTickets for help on using tickets.
Back to Top