InvalidBasesError: Cannot resolve bases for []

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

    I've come across this issue, and as commenting out the model isn't really a solution, I've found that setting the undocumented auto_created = True to the Meta class will make Django ignore it.

    class GroupProxy(Group):
    
        class Meta:
            proxy = True
            auto_created = True
    

提交回复
热议问题