﻿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
25953	Add from_db_value() support to django.contrib.postgres.fields.ArrayField.	Karan Lyons		"Currently ArrayField assumes that the base field will not need to alter the returned python value from the postgres backend, as this is the case for all core fields. As an example, take this absurd field:

{{{
class ContrivedStringedIntegerField(models.IntegerField):
	def from_db_value(self, value, expression, connection, context):
		return unicode(value)
}}}

Used alone in a model this will return a string, but used as part of an ArrayField we’ll get integers instead.

from_db_value() is a no-op for performance reasons, so rather than incur the penalty inside of ArrayField when it’s unnecessary, I propose the attached patch, which adds a from_db_value() method to the instantiated ArrayField if its base field has one as well."	Bug	closed	contrib.postgres	1.9	Normal	duplicate	ArrayField, from_db_value		Accepted	1	0	1	0	0	0
