﻿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
31918	in_bulk not working for distinct fields	Wolph	Kaustubh	"The `in_bulk` queryset function currently checks for the `pk` field or for `unique` fields. But if you do a `queryset.distinct(field)` that field is also unique for that queryset so it should be usable for an `in_bulk`.

I believe the fix would be as easy as patching these lines: https://github.com/django/django/blob/41725602afebe2ddb018b99afe134384cc3bf69e/django/db/models/query.py#L699-L703

To include `and field_name not in self.query.distinct_fields`"	New feature	closed	Database layer (models, ORM)	3.1	Normal	fixed	in_bulk distinct queryset		Ready for checkin	1	0	0	0	0	0
