Opened 6 years ago

Closed 6 years ago

Last modified 3 years ago

#11218 closed (fixed)

typo: forgot to rename an occurrence (2)

Reported by: buriy 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 buriy 6 years ago.
silly typo fix (not verified flow correctness)

Download all attachments as: .zip

Change History (6)

Changed 6 years ago by buriy

silly typo fix (not verified flow correctness)

comment:1 Changed 6 years ago by buriy

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

comment:2 Changed 6 years ago by gwilson

  • Resolution set to fixed
  • Status changed from new to closed

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

comment:3 Changed 6 years ago by gwilson

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

Backport of [10861] from trunk.

comment:4 Changed 6 years ago by ccahoon

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

comment:4 Changed 3 years ago by jacob

  • milestone 1.1 deleted

Milestone 1.1 deleted

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