﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
20484	GenericIPAddressField must not allow blank for NOT NULL fields	Sasha Romijn	nobody	"GenericIPAddressField internally translates all blank values, e.g. an empty string, to None/NULL before saving them in the database. This is good, because in PostgreSQL this field is backed by INET, meaning an empty string is not allowed (this problem also affects IPAddressField, but we can't change it as it would break backwards compatibility, #5622).

However, this means that a field which allows blank but not null values, will trigger a database error at runtime when trying to save a blank value. Therefore, the model validation should not allow GenericIPAddressFields to have blank but not null.

To summarise:
* Current behaviour: when storing a blank value in a `GenericIPAddressField(blank=True, null=False)`, a database exception will be triggered
* New behaviour: a `GenericIPAddressField(blank=True, null=False)` will trigger a model validation error"	Bug	closed	Database layer (models, ORM)	dev	Normal	fixed		eromijn@…	Accepted	1	0	0	0	0	0
