Modify ↓
Ticket #373 (closed defect: fixed)
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: |
Description
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.
Attachments
Change History
comment:1 Changed 3 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 3 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.
