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: no UI/UX: no


Hello, I think there's a typo in django/db/models/sql/

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}
        return super(InsertQuery, self).clone(klass, **extras)

Change History (2)

comment:1 Changed 10 years ago by Malcolm Tredinnick

Owner: changed from nobody to Malcolm Tredinnick
Status: newassigned

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.

comment:2 Changed 10 years ago by Malcolm Tredinnick

Resolution: fixed
Status: assignedclosed

Fixed in r9150 (and r9151 on the django-1.0.X branch).

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