Opened 8 years ago

Closed 8 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:
Needs tests: Patch needs improvement:
Easy pickings: UI/UX:


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

Download all attachments as: .zip

Change History (2)

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

comment:1 Changed 8 years ago by mtredinnick

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

(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