Inconsistant method resulution for model inheritance
HealperRasmus opened this issue · 2 comments
HealperRasmus commented
It seems like this product does not work with inheritance.
When I run the code below (just running makemigrations command) I get the following error:
TypeError: Cannot create a consistent method resolution
order (MRO) for bases PrivacyModel, ModelA
class ModelA(models.Model):
a = models.CharField(max_length=50, default="Hello")
class PrivacyMeta:
fields = ["a"]
class ModelB(ModelA):
b = models.BooleanField(null=True, default=True)
class PrivacyMeta:
fields = ["b"]
HealperRasmus commented
Is inheritance just not supported or is this a bug?
I know I could define ModelA to be abstract but in my case I would rather not do that.
Best regards and thanks for this awesome product! 👍
jamesoutterside commented
Thanks for reporting this issue, yes, we should support that scenario. I've added a branch with a fix and hopefully we can get that checked and released soon.
Thanks!
James