﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
29816	Bug fix for ticket #29138	Constantino Schillebeeckx	nobody	"I've put together a [https://github.com/ConstantinoSchillebeeckx/django/tree/fix-29138 bug fix] for the case when `autocomplete_fields` is used on a foreign-key field that has `on_fields` specified; bug originally reported [https://code.djangoproject.com/ticket/29138 here].

'''Note''' I've been able to update all unit tests and create some new ones, however the original ticket mentions using `to_field_allowed` to prevent data leaks. I've tried to implement it (see [https://github.com/ConstantinoSchillebeeckx/django/blob/fix-29138/django/contrib/admin/views/autocomplete.py#L29 here]), however I can't get it to play nicely with the unit tests. When uncommented, the `id_field` isn't properly being considered as to_field_allowed. I'm not familiar with this function, so could use some help troubleshooting."	Bug	closed	contrib.admin	2.1	Normal	duplicate	autocomplete_fields		Unreviewed	0	0	0	0	0	0
