Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix bug that assumes we have real when checking can_have_children.
  • Loading branch information
vinnyrose committed Oct 13, 2014
commit 87ed0e42b278d88620384297af327a83b57d59d7
3 changes: 2 additions & 1 deletion polymorphic_tree/admin/parentadmin.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ def can_have_children(self, node, child=None, is_real=False):
return False

# or an instance variable
Node = node if is_real else node.get_real_instance()
if not is_real:
can_have_children = node.get_real_instance().can_have_children
if can_have_children:
if child is None:
return True # just interested in boolean
Expand Down