Opened 9 years ago

Closed 9 years ago

#4686 closed (fixed)

IPAddressField should have empty_strings_allowed = False

Reported by: ian.g.kelly@… Owned by: Jacob
Component: Uncategorized Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

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@… 9 years ago.

Download all attachments as: .zip

Change History (2)

Changed 9 years ago by ian.g.kelly@…

Attachment: IPAddressField.diff added

comment:1 Changed 9 years ago by Malcolm Tredinnick

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