diff --git a/django/db/models/sql/compiler.py b/django/db/models/sql/compiler.py index ba2c6c91b3..4d571b78fa 100644 --- a/django/db/models/sql/compiler.py +++ b/django/db/models/sql/compiler.py @@ -21,7 +21,7 @@ class SQLCompiler(object): self.query = query self.connection = connection self.using = using - self.quote_cache = {} + self.quote_cache = {'*': '*'} # When ordering a queryset with distinct on a column not part of the # select set, the ordering column needs to be added to the select # clause. This information is needed both in SQL construction and