Ticket #15947: base.diff

File base.diff, 561 bytes (added by phuihock, 4 years ago)
  • django/db/models/base.py

     
    586586    delete.alters_data = True
    587587
    588588    def _get_FIELD_display(self, field):
    589         value = getattr(self, field.attname)
     589        value = field.to_python(getattr(self, field.attname))
    590590        return force_unicode(dict(field.flatchoices).get(value, value), strings_only=True)
    591591
    592592    def _get_next_or_previous_by_FIELD(self, field, is_next, **kwargs):
Back to Top