Opened 11 years ago
Closed 11 years ago
#23876 closed Cleanup/optimization (fixed)
SQLAggregateCompiler.as_sql() accepts a compiler arg that it doesn't use
| Reported by: | Carl Meyer | Owned by: | nobody | 
|---|---|---|---|
| Component: | Database layer (models, ORM) | Version: | 1.6 | 
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | yes | Needs documentation: | no | 
| Needs tests: | no | Patch needs improvement: | no | 
| Easy pickings: | no | UI/UX: | no | 
Description
It even goes to the trouble of setting the compiler arg to self if one wasn't passed in; but then compiler is never used in the method.
Many of the other SQLCompiler subclasses have as_sql methods that don't accept compiler, so it doesn't appear to be an invariant.
Test suite lasses without that argument, at least on SQLite. Will push a cleanup PR to check if anything else breaks on CI.
Change History (2)
comment:1 by , 11 years ago
| Has patch: | set | 
|---|
comment:2 by , 11 years ago
| Resolution: | → fixed | 
|---|---|
| Status: | new → closed | 
  Note:
 See   TracTickets
 for help on using tickets.
    
https://github.com/django/django/pull/3584