Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#14871 closed (fixed)

ZAIDField doesn't handle EMPTY_VALUES correctly

Reported by: Idan Gazit Owned by: Idan Gazit
Component: contrib.localflavor Version: 1.2
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Fields with required=False should not choke while cleaning any value in EMPTY_VALUES (from django.core.validators):

EMPTY_VALUES = (None, , [], (), {})

Attachments (1)

14871.diff (672 bytes) - added by Idan Gazit 6 years ago.

Download all attachments as: .zip

Change History (4)

Changed 6 years ago by Idan Gazit

Attachment: 14871.diff added

comment:1 Changed 6 years ago by Idan Gazit

Status: newassigned
Triage Stage: UnreviewedAccepted

comment:2 Changed 6 years ago by Alex Gaynor

Resolution: fixed
Status: assignedclosed

(In [14956]) Fixed #14871, #14872 -- ZAIDField didn't handle alll EMPTY_VALUES correctly and ZAPostCodeField didn't respect *args or kwargs (such as required=False). Also converted South African localflavor doctests into unittests. We have always been at war with doctests. Thanks to Idan Gazit.

Fixing ZA localflavor clean() #14872

comment:3 Changed 6 years ago by Alex Gaynor

(In [14980]) [1.2.X] Fixed #14871, #14872 -- ZAIDField didn't handle alll EMPTY_VALUES correctly and ZAPostCodeField didn't respect *args or kwargs (such as required=False). Also converted South African localflavor doctests into unittests. We have always been at war with doctests. Thanks to Idan Gazit. Backport of [14956].

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