﻿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
17911	"Admin change page does not ""map"" None choices when they are readonly"	justin.r.donnelly@…	edwtjo	"The Django admin change page does not ""map"" None values as per the class' model field choices when the values are readonly.  It shows ""(None)"" (this value comes from EMPTY_CHANGELIST_VALUE) instead.  This is demonstrated by the attached screenshot original_helpers_incorrect_change.png.  The admin select page properly maps None values based on the class' model field choices.  This is demonstrated by the attached screenshot original_helpers_correct_select.png.  The change page should display the same value that the select page does.  See attached screenshot modified_helpers_correct_change.png for what the admin change page should look like.

This is due to a bug in contrib/admin/helpers.py.  The easiest way to fix the bug is to change line 185 of helpers.py from
result_repr = EMPTY_CHANGELIST_VALUE
to
result_repr = display_for_field(value, f)
However, that leaves the if and else branches executing the same statement (kind of weird).  I have attached a modified version of helpers.py where that if/elif/else has been rewritten as an if/else.

I have also attached a tarball of an application that demonstrates this bug.  The username is ""user"" and password is ""password"".

This is my first ticket submission, so I hope I provided everything you need."	Bug	closed	contrib.admin	1.3	Normal	fixed		charette.s@…	Ready for checkin	1	0	0	0	1	1
