﻿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
11218	typo: forgot to rename an occurrence (2)	Yuri Baburov	nobody	"No variable ""results"" in the function, seems there's no test to check this, but my PyDev Extensions nailed it down
Please check the flow correctness, as I don't know what is going on there.

{{{
diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py
index 394e30b..cc8c264 100644
--- a/django/db/models/sql/query.py
+++ b/django/db/models/sql/query.py
@@ -2362,7 +2362,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.
}}}"		closed	Database layer (models, ORM)	1.1-beta		fixed			Unreviewed	1	0	0	0	0	0
