Skip to content

Commit

Permalink
fix get_pk function
Browse files Browse the repository at this point in the history
  • Loading branch information
uralbash committed Aug 4, 2014
1 parent 84f1863 commit af88ebc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ nohup.out
.tox
__pycache__
_build
.ropeproject
2 changes: 1 addition & 1 deletion sqlalchemy_mptt/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def get_pk(cls):
@classmethod
def get_db_pk(cls):
pk = getattr(cls, cls.get_pk())
return pk.name
return pk.name or cls.get_pk()

@classmethod
def get_class_pk(cls):
Expand Down

0 comments on commit af88ebc

Please sign in to comment.