Code

Opened 8 years ago

Closed 8 years ago

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

Download all attachments as: .zip

Change History (3)

Changed 8 years ago by dackze+django@…

Fixes forms.USStateField.html2python

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

  • Summary changed from Blank USStateField data with blank=True becomes None, breaks INSERTs/UPDATEs to [patch] Blank USStateField data with blank=True becomes None, breaks INSERTs/UPDATEs

comment:2 Changed 8 years ago by mtredinnick

  • Resolution set to fixed
  • Status changed from new to closed

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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.