summaryrefslogtreecommitdiff
path: root/django/db/models/sql
diff options
context:
space:
mode:
Diffstat (limited to 'django/db/models/sql')
-rw-r--r--django/db/models/sql/query.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py
index a25ed52564..8d7715b607 100644
--- a/django/db/models/sql/query.py
+++ b/django/db/models/sql/query.py
@@ -425,7 +425,7 @@ class BaseQuery(object):
If 'with_aliases' is true, any column names that are duplicated
(without the table names) are given unique aliases. This is needed in
- some cases to avoid ambiguitity with nested queries.
+ some cases to avoid ambiguity with nested queries.
"""
qn = self.quote_name_unless_alias
qn2 = self.connection.ops.quote_name
@@ -1823,7 +1823,7 @@ class BaseQuery(object):
return cursor
if result_type == SINGLE:
if self.ordering_aliases:
- return cursor.fetchone()[:-len(results.ordering_aliases)]
+ return cursor.fetchone()[:-len(self.ordering_aliases)]
return cursor.fetchone()
# The MULTI case.