django/django — pull request #1417 by collinanderson (2013-07-31 20:28:53+00:00)
Title: #20836 to_field lost when adding via raw_id_fields

Sorry, it's against 1.6.x. I don't have easy access to python2.7 for master.

Basically, TO_FIELD_VAR really needs to follow IS_POPUP_VAR everywhere it goes. Whenever it's a popup, there's always the possibility that there's a to_field.

https://code.djangoproject.com/ticket/20836