InvalidBasesError: Cannot resolve bases for []

后端 未结 14 954
遥遥无期
遥遥无期 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:51

    If this occurs to you in an app that already has a migrations folder (and a init.py file in it), delete all other files, and run makemigrations and migrate again.

    P.S.: You may need to reconfigure your models.py or some tables in your database manually.

提交回复
热议问题