Opened 18 years ago

Closed 18 years ago

Last modified 18 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: dev
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

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@… 18 years ago.
Fixes forms.USStateField.html2python

Download all attachments as: .zip

Change History (3)

by dackze+django@…, 18 years ago

Attachment: django-blank-state.diff added

Fixes forms.USStateField.html2python

comment:1 by dackze+django@…, 18 years ago

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 by Malcolm Tredinnick, 18 years ago

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