Skip to content

Commit 8eeca5f

Browse files
committed
Fix Django 1.10 support, now that django-mptt 0.8.6 is out
1 parent f7d6b38 commit 8eeca5f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

polymorphic_tree/models.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@ class PolymorphicMPTTModel(with_metaclass(PolymorphicMPTTModelBase, MPTTModel, P
7777
can_have_children = True
7878

7979
# Django fields
80-
_default_manager = PolymorphicMPTTModelManager()
80+
if django.VERSION >= (1, 10):
81+
objects = PolymorphicMPTTModelManager()
82+
else:
83+
_default_manager = PolymorphicMPTTModelManager()
8184

8285
class Meta:
8386
abstract = True

0 commit comments

Comments
 (0)