﻿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
4435	[unicode] get_FIELD_display() does not work for None values	mir@…	Malcolm Tredinnick	"If you have a model field with choices and null=True, the model function get_FIELD_display() returns {{{u'None'}}} if the attribute is None. It should return {{{None}}}

django.db.models.base, lines ~ 322 ff:
{{{
    def _get_FIELD_display(self, field):
        value = getattr(self, field.attname)
        return force_unicode(dict(field.choices).get(value, value))
}}}

Either this function, or force_unicode, needs a special check for None.


"		closed	Database layer (models, ORM)	other branch		fixed			Accepted	0	0	0	0	0	0
