When I run tests I get this error during database initialization:
JavaScript
x
3
1
django.db.migrations.state.InvalidBasesError: Cannot resolve bases for [<ModelState: 'users.GroupProxy'>]
2
This can happen if you are inheriting models from an app with migrations (e.g. contrib.auth)
3
I created this proxy for contrib.auth Group model to place it in my app in django admin:
JavaScript
1
6
1
class GroupProxy(Group):
2
class Meta:
3
proxy = True
4
verbose_name = Group._meta.verbose_name
5
verbose_name_plural = Group._meta.verbose_name_plural
6
So what can I do to fix this issue?
Advertisement
Answer
After a lot of digging on this the only thing that worked for me was
comment out the offending apps, run migrations, then add them in again.
Just a workaround but hopefully it helps somebody.