This should have been more obvious to me in the first place. The
problem only exists for an empty string value (the choices in my
particular case hat string keys, and the field was not nullable).
Tries this case:

>>> w = Whiz(c='')
>>> w.save()
>>> w.get_c_display()
u''

Expected:
    u''
Got:
    u'---------'

That particular case behaved differently before the change, for the
reason mentioned, i.e.:

>>> Whiz._meta.get_field('c').choices
((1, 'First'), (0, 'Other'))

>>> Whiz._meta.get_field('c').flatchoices
[('', '---------'), (1, 'First'), (0, 'Other')]

Michael
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to