Django

Code

Ticket #9068 (closed: fixed)

Opened 3 months ago

Last modified 2 months ago

InsertQuery.clone typo?

Reported by: rush Assigned to: mtredinnick
Milestone: Component: Database layer (models, ORM)
Version: 1.0 Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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)

Attachments

Change History

09/12/08 20:33:56 changed by mtredinnick

  • owner changed from nobody to mtredinnick.
  • needs_better_patch changed.
  • status changed from new to assigned.
  • needs_tests changed.
  • needs_docs changed.

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.

10/05/08 06:58:10 changed by mtredinnick

  • status changed from assigned to closed.
  • resolution set to fixed.

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


Add/Change #9068 (InsertQuery.clone typo?)




Change Properties
Action