﻿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
31124	Model.get_FOO_display() does not work correctly with inherited choices.	Yash Jhunjhunwala	Carlton Gibson	"Given a base model with choices A containing 3 tuples
Child Model inherits the base model overrides the choices A and adds 2 more tuples
get_foo_display does not work correctly for the new tuples added

Example:


{{{
class A(models.Model):
   foo_choice = [(""A"",""output1""),(""B"",""output2"")]
   field_foo = models.CharField(max_length=254,choices=foo_choice)
   class Meta:
       abstract = True

class B(A):
   foo_choice = [(""A"",""output1""),(""B"",""output2""),(""C"",""output3"")]
   field_foo = models.CharField(max_length=254,choices=foo_choice)
}}}

Upon invoking get_field_foo_display() on instance of B , 
For value ""A"" and ""B"" the output works correctly i.e. returns ""output1"" / ""output2""
but for value ""C"" the method returns ""C"" and not ""output3"" which is the expected behaviour

"	Bug	closed	Database layer (models, ORM)	3.0	Release blocker	fixed		Carlton Gibson Sergey Fedoseev	Ready for checkin	1	0	0	0	0	0
