Opened 7 years ago

Closed 7 years ago

Last modified 5 years ago

#11218 closed (fixed)

typo: forgot to rename an occurrence (2)

Reported by: Yuri Baburov Owned by: nobody
Component: Database layer (models, ORM) Version: 1.1-beta
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

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.

Attachments (1)

11218.patch (539 bytes) - added by Yuri Baburov 7 years ago.
silly typo fix (not verified flow correctness)

Download all attachments as: .zip

Change History (6)

Changed 7 years ago by Yuri Baburov

Attachment: 11218.patch added

silly typo fix (not verified flow correctness)

comment:1 Changed 7 years ago by Yuri Baburov

Has patch: set
Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset

comment:2 Changed 7 years ago by Gary Wilson

Resolution: fixed
Status: newclosed

(In [10861]) Fixed #11216 and #11218 -- Corrected a few typos, thanks buriy.

comment:3 Changed 7 years ago by Gary Wilson

(In [10862]) [1.0.X] Fixed #11216 and #11218 -- Corrected a few typos, thanks buriy.

Backport of [10861] from trunk.

comment:4 Changed 7 years ago by ccahoon

(In [10990]) Fixed #11216 and #11218 -- Corrected a few typos, thanks buriy.

comment:4 Changed 5 years ago by Jacob

milestone: 1.1

Milestone 1.1 deleted

Note: See TracTickets for help on using tickets.
Back to Top