Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#2685 closed defect (fixed)

[patch] Blank USStateField data with blank=True becomes None, breaks INSERTs/UPDATEs

Reported by: dackze+django@… Owned by: Adrian Holovaty
Component: Validators Version: master
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

If you have a model with a USStateField(blank=True) field, blank values get turned into None and cause INSERTs and UPDATEs to fail with blank values, due to inserting a NULL value into a NOT NULL field.

Attachments (1)

django-blank-state.diff (599 bytes) - added by dackze+django@… 10 years ago.
Fixes forms.USStateField.html2python

Download all attachments as: .zip

Change History (3)

Changed 10 years ago by dackze+django@…

Attachment: django-blank-state.diff added

Fixes forms.USStateField.html2python

comment:1 Changed 10 years ago by dackze+django@…

Summary: Blank USStateField data with blank=True becomes None, breaks INSERTs/UPDATEs[patch] Blank USStateField data with blank=True becomes None, breaks INSERTs/UPDATEs

comment:2 Changed 10 years ago by Malcolm Tredinnick

Resolution: fixed
Status: newclosed

(In [3785]) Fixed #2685 -- Correctly process blank input for USStateField elements. Thanks,
dackze+django@….

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