Skip to content

Commit

Permalink
++docs
Browse files Browse the repository at this point in the history
  • Loading branch information
uralbash committed Sep 28, 2017
1 parent 4aae58b commit d677039
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sqlalchemy_mptt/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ def get_pk_name(cls):

@classmethod
def get_default_level(cls):
'''
Compatibility with Django MPTT: level value for root node.
See https://github.com/uralbash/sqlalchemy_mptt/issues/56
'''
return getattr(cls, 'sqlalchemy_mptt_default_level', 1)

@classmethod
Expand Down

0 comments on commit d677039

Please sign in to comment.