﻿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
24092	New ArrayField from django.contrib.postgres.fields does not correctly save an array of GenericIPAddressField	Steve	Marc Tamlyn	"ArrayField throws an error when using an array of GenericIPAddressField as the base_field:

{{{
from django.contrib.postgres.fields import ArrayField

class MyModel(models.Model):
    ips = ArrayField(base_field=models.GenericIPAddressField(), db_index=True)
}}}

{{{
>>> test = MyModel()
>>> test.ips = ['10.2.3.4', '1.2.3.4']
>>> test.save()

... truncated...

django.db.utils.ProgrammingError: column ""ips"" is of type inet[] but expression is of type text[]
LINE 1: ...story"" SET ""model_id"" = 1, ""ips"" = ARRAY['10...
}}}

There also appears to be an issue, when reading from the model (where inet[] data was set in the db itself), instead of a string array of IPs being returned we get this:
{{{
>>> test.ips
'{10.2.3.4, 1.2.3.4}'
}}}

"	Bug	closed	contrib.postgres	dev	Release blocker	fixed			Ready for checkin	1	0	0	0	0	0
