InvalidBasesError: Cannot resolve bases for []

后端 未结 14 956
遥遥无期
遥遥无期 2021-02-03 23:03

When I run tests I get this error during database initialization:

django.db.migrations.state.InvalidBasesError: Cannot resolve bases for [

        
14条回答
  •  别跟我提以往
    2021-02-03 23:44

    One possibility is that the deleting or creating of a model in the migration file is in the wrong order. I experienced this in Django 1.7.8 when the base model was BEFORE the derived model. Swapping the order for deleting the model fixed the issue.

提交回复
热议问题