mirror of https://github.com/django/django.git
parent
d407164c04
commit
4007c8f6eb
|
@ -317,7 +317,7 @@ class SQLCompiler(object):
|
||||||
|
|
||||||
for name in self.query.distinct_fields:
|
for name in self.query.distinct_fields:
|
||||||
parts = name.split(LOOKUP_SEP)
|
parts = name.split(LOOKUP_SEP)
|
||||||
field, col, alias, _, _ = self._setup_joins(parts, opts)
|
field, col, alias, _, _ = self._setup_joins(parts, opts, None)
|
||||||
col, alias = self._final_join_removal(col, alias)
|
col, alias = self._final_join_removal(col, alias)
|
||||||
result.append("%s.%s" % (qn(alias), qn2(col)))
|
result.append("%s.%s" % (qn(alias), qn2(col)))
|
||||||
return result
|
return result
|
||||||
|
|
Loading…
Reference in New Issue