﻿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
35946	Postgres ArrayField should convert values when given a list	Zerq	Tanish Yelgoe	"Currently ArrayField.to_python only calls base_field.to_python when given string. In my opinion it should call it always. Currently using this field is inconsistent. Simple example:
{{{
    f = MyModel._meta.get_field(""int_array"")
    f.clean('[1, ""2"", 3]', None) # ok
    f.clean([1, ""2"", 3], None) # error
}}}

Proposed ArrayField.to_python, witch always calls base_field.to_python(val):
{{{
    def to_python(self, value):
        if isinstance(value, str):
            value = json.loads(value)
        return [self.base_field.to_python(val) for val in value]
}}}"	Bug	closed	contrib.postgres		Normal	wontfix	ArrayField to_python	Mike Lissner	Unreviewed	0	0	0	0	1	0
