Opened 10 years ago
Closed 10 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: | UI/UX: |
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 Changed 10 years ago by
Owner: | changed from nobody to Malcolm Tredinnick |
---|---|
Status: | new → assigned |
comment:2 Changed 10 years ago by
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.