Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#1614 closed defect (fixed)

query.lookup_inner doesn't update tables

Reported by: anonymous Owned by: Adrian Holovaty
Component: Core (Other) Version: magic-removal
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

django.db.models.query.lookup_inner returns a (tables,joins,where,params) tuple. After staring at this 140-line piece of spaggeti code, I'm still unsure of what and why it does what it does, but for one thing, the returned tables list is always empty. The only place where tables is modified is at the line " tables.extend(tables2)", but tables2 is the returned tables list from a recursive call of lookup_inner. There should be a tables.append(sometable) somewhere, just like where and params. If this is not a bug and tables should in fact always be empty, what's the point of returning it ?

So, how about taking the chance to refactor things a little when this is fixed ?

Change History (3)

comment:1 by Adrian Holovaty, 18 years ago

I'm indeed looking into refactoring this to get rid of the crap in there.

comment:2 by Adrian Holovaty, 18 years ago

Status: newassigned

comment:3 by Adrian Holovaty, 18 years ago

Resolution: fixed
Status: assignedclosed

Fixed in [3317].

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