git.ithinksw.org
/
philo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Corrected philo tests and removed all use of penfield models in those tests - resolve...
[philo.git]
/
philo
/
models
/
base.py
diff --git
a/philo/models/base.py
b/philo/models/base.py
index
9ba1ff6
..
b41a00e
100644
(file)
--- a/
philo/models/base.py
+++ b/
philo/models/base.py
@@
-467,6
+467,9
@@
class TreeModel(MPTTModel):
if root == self:
return ''
+ if root is None and self.is_root_node():
+ return self.slug
+
if root is not None and not self.is_descendant_of(root):
raise AncestorDoesNotExist(root)