#20749: get_FOO_display does not return proper value or warn for inconsistent 
type
-------------------------------------+-------------------------------------
     Reporter:  ellisd23@…           |                    Owner:  ellisd23
         Type:  Bug                  |                   Status:  assigned
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |               Resolution:
     Severity:  Normal               |             Triage Stage:  Accepted
     Keywords:                       |      Needs documentation:  0
    Has patch:  1                    |  Patch needs improvement:  1
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Comment (by ellisd23):

 Okay, I believe I've a solution that is 1) lean, only modifying one
 function in the codebase; 2) better for the user, adding the functionality
 as intended rather than bothering the user with warnings; and 3) flexible,
 using a field's to_python function to look up the value rather than
 attempting to discern the type.

 I've added the commit to the pull request.  The specific commit is here:
 
https://github.com/dellis23/django/commit/308d9d10967727395db22757661170467412d6d6

-- 
Ticket URL: <https://code.djangoproject.com/ticket/20749#comment:8>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/076.4e008dbcfd5c41093b5d6797d47bd240%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to