Opened 6 years ago

Closed 6 years ago

#11923 closed (duplicate)

Suspected typo in django/db/models/sql/query.py

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

Description

I believe I have found a typo in [source:/django/tags/releases/1.1/django/db/models/sql/query.py django/db/models/sql/query.py] at line 1400.

This line causes a TypeError ("update() takes exactly one argument (2 given)"). Looking at it, and the surrounding code (specifically line 1417) I believe the intent is instead of:

avoid.update(self.dupe_avoidance.get(id(opts), lhs_col),())

it should actually be:

avoid.update(self.dupe_avoidance.get((id(opts), lhs_col),()))

Attachments (1)

django-ticket-11923.patch (812 bytes) - added by wogan 6 years ago.

Download all attachments as: .zip

Change History (3)

comment:1 Changed 6 years ago by wogan

  • Cc django@… added
  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

Changed 6 years ago by wogan

comment:2 Changed 6 years ago by Alex

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

Duplicate of #11764.

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