Opened 16 years ago
Closed 16 years ago
#9068 closed (fixed)
InsertQuery.clone typo?
Reported by: | rush | Owned by: | Malcolm Tredinnick |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 1.0 |
Severity: | 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
Hello, I think there's a typo in django/db/models/sql/subqueries.py:296
return super(InsertQuery, self).clone(klass, extras)
instead of
return super(InsertQuery, self).clone(klass, **extras)
Please also consider this modification for better subclassing
def clone(self, klass=None, **kwargs): extras = {'columns': self.columns[:], 'values': self.values[:], 'params': self.params} extras.update(kwargs) return super(InsertQuery, self).clone(klass, **extras)
Change History (2)
comment:1 by , 16 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
In future, please attach a patch, rather than putting it in the description so that we can make sure the right change is applied. Actually that whole
clone()
method looks pretty broken. I'll have to fix it and write some tests, etc.