#20836: to_field lost when adding via raw_id_fields
--------------------------------+--------------------------------------
     Reporter:  CollinAnderson  |                    Owner:  nobody
         Type:  Bug             |                   Status:  new
    Component:  contrib.admin   |                  Version:  1.6-beta-1
     Severity:  Normal          |               Resolution:
     Keywords:                  |             Triage Stage:  Accepted
    Has patch:  1               |      Needs documentation:  0
  Needs tests:  0               |  Patch needs improvement:  0
Easy pickings:  0               |                    UI/UX:  0
--------------------------------+--------------------------------------

Comment (by CollinAnderson):

 Yeah, I was thinking about that when I was creating the pull request. I'm
 personally not that worried about it because this is such a corner case as
 it is. I'm apparently the first one to ever notice the raw_id + to_field +
 adding case, and we would need a raw_id + to_field + adding + having a
 field named "t" before there would be an issue.

 Though, yes, it's possible and it will only be harder to change in the
 future. And deprecating/changing this during the same release as _popup
 would make a lot of sense.

 Actually, here's a proposal. How about instead of having a separate "t"
 variable, we simply have _popup=username or _popup=pk (or rename _popup
 again before 1.6 comes out). I think that would actually simplify the code
 quite a bit because it's one less thing we need to keep passing around.
 Currently is_popup is a boolean, and the "t" var only makes sense when
 _popup is true, so if we're changing things anyway, why not just combine
 the two into one?

-- 
Ticket URL: <https://code.djangoproject.com/ticket/20836#comment:5>
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/072.70f93e7315bee721dda7baadb127a003%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to