1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Refs #20939 -- Removed the Query._forced_pk hack.

This commit is contained in:
Simon Charette
2017-04-23 01:05:51 -04:00
parent fcb5dbfec0
commit ec50937bcb
4 changed files with 11 additions and 11 deletions

View File

@@ -81,7 +81,7 @@ class RelatedIn(In):
AND)
return root_constraint.as_sql(compiler, connection)
else:
if getattr(self.rhs, '_forced_pk', False):
if not getattr(self.rhs, 'has_select_fields', True):
self.rhs.clear_select_clause()
if (getattr(self.lhs.output_field, 'primary_key', False) and
self.lhs.output_field.model == self.rhs.model):