We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2cf410d commit 134a692Copy full SHA for 134a692
polymorphic_tree/models.py
@@ -26,7 +26,9 @@ def _get_base_polymorphic_model(ChildModel):
26
First model in the inheritance chain that inherited from the PolymorphicMPTTModel
27
"""
28
for Model in reversed(ChildModel.mro()):
29
- if isinstance(Model, PolymorphicMPTTModelBase) and Model is not PolymorphicMPTTModel:
+ if (isinstance(Model, PolymorphicMPTTModelBase) and
30
+ Model is not PolymorphicMPTTModel and
31
+ not Model._meta.abstract):
32
return Model
33
return None
34
0 commit comments