migrating a model from concrete inheritance to abstract inheritance

26 views
Skip to first unread message

Riccardo Magliocchetti

unread,
Dec 9, 2016, 7:33:38 AM12/9/16
to Django users
Hello,

on django 1.8.17 i'm trying to convert a model Format away from inheriting from a concrete model DryModel and i get this running a migration that adds the id field:

django.core.exceptions.FieldError: Local field u'id' in class 'Format' clashes with field of similar name from base class 'DryModel'

I've already removed the pointer to DryModel in another migration. So migrations thinks my model is still inheriting from DryModel while if i open a shell and print the bases of format i correctly get:

In [2]: Format.__bases__
Out[2]: (myapp.models.AbstractModel,)

Any hint on how to handle that?

Thanks,
Riccardo Magliocchetti
Reply all
Reply to author
Forward
0 new messages