Ticket #373 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

inherited keyword arguments passed to a model causes an exception

Reported by: jdstallings@… Owned by: andrew
Priority: major Milestone: 0.7
Component: migrations Version: 0.7-pre
Keywords: Cc:


If you have a model like the following:

class Base(models.Model):

field1 = modelsCharField()

class Derived(Base):

field2 = models.CharField?()

and you run a data migration doing something like the following:

derived = orm.Derived(field1='field)

you get the following exception raised:

raise TypeError?("'%s' is an invalid keyword argument for this function" % kwargs.keys()[0])

I believe the potential fix should be as attached.


error.diff (515 bytes) - added by jdstallings@… 6 years ago.

Change History

Changed 6 years ago by jdstallings@…

comment:1 Changed 6 years ago by andrew

  • Status changed from new to assigned
  • Milestone set to 0.7

That looks promising; thanks for the patch, I'll check it and commit it tomorrow.

comment:2 Changed 6 years ago by andrew

  • Status changed from assigned to closed
  • Resolution set to fixed

It wasn't quite "tomorrow" - sorry - but committed in [2d9586a718b2].

Note: See TracTickets for help on using tickets.