Opened 17 years ago

Closed 17 years ago

#4686 closed (fixed)

IPAddressField should have empty_strings_allowed = False

Reported by: ian.g.kelly@… Owned by: Jacob
Component: Uncategorized Version: dev
Severity: 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

The empty string isn't a valid value for IPAddressFields, and PostgreSQL in particular won't accept it; NULL should be used instead. However, IPAddressField inherits the attribute empty_strings_allowed = True from the Field class. Additionally, the Oracle backend interprets NULL to mean the empty string unless empty_strings_allowed is False. This patch corrects these inconsistencies.

Attachments (1)

IPAddressField.diff (496 bytes ) - added by ian.g.kelly@… 17 years ago.

Download all attachments as: .zip

Change History (2)

by ian.g.kelly@…, 17 years ago

Attachment: IPAddressField.diff added

comment:1 by Malcolm Tredinnick, 17 years ago

Resolution: fixed
Status: newclosed

(In [5544]) Fixed #4686 -- Do not permit empty strings in IPAddressField. Should be fully
backwards compatible, but fixes an Oracle subtlety. Thanks, Ian Kelly.

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