﻿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
7913	Backwards incompatible change by #4412 / r7977: get_FIELD_display() returns blank value	miracle2k	nobody	"Previously, get_FIELD_display(), for a blank or unknown value of FIELD, return the value unchanged, e.g. say None or an empty string.

After the change, it returns the automatically inserted blank choice (-------). This is due to it now using field.flatchoices, which is dynamically generated through the get_choices() method, whereas it previously just used field.choices, which contains the unmodified tuple the field receives through __init__.

This may also be an unwanted discrepancy between the two attributes.

{{{
class Whiz(models.Model):
    CHOICES = (
        (1,'First'),
        (0,'Other'),
    )
    c = models.IntegerField(choices=CHOICES, null=True)

>>> w = Whiz(c='')
>>> w.save()
>>> w.get_c_display()
u''

Expected:
    u''
Got:
    u'---------'
}}}

Reference:
http://groups.google.com/group/django-developers/browse_thread/thread/5b899cb2d8388717/50ed30aa358e2d59?hl=en#50ed30aa358e2d59"		closed	Database layer (models, ORM)	dev		fixed		evenson@…	Unreviewed	1	0	0	0	0	0
