Opened 17 years ago
Closed 17 years ago
#4686 closed (fixed)
IPAddressField should have empty_strings_allowed = False
Reported by: | 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)
Change History (2)
by , 17 years ago
Attachment: | IPAddressField.diff added |
---|
comment:1 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
(In [5544]) Fixed #4686 -- Do not permit empty strings in IPAddressField. Should be fully
backwards compatible, but fixes an Oracle subtlety. Thanks, Ian Kelly.