git.ithinksw.org
/
philo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of http://github.com/ithinksw/philo
[philo.git]
/
models
/
base.py
diff --git
a/models/base.py
b/models/base.py
index
3bcf394
..
290e8b8
100644
(file)
--- a/
models/base.py
+++ b/
models/base.py
@@
-425,12
+425,12
@@
class TreeModel(MPTTModel):
if root is not None and not self.is_descendant_of(root):
raise AncestorDoesNotExist(root)
if root is not None and not self.is_descendant_of(root):
raise AncestorDoesNotExist(root)
- qs = self.get_ancestors()
+ qs = self.get_ancestors(
include_self=True
)
if root is not None:
qs = qs.filter(**{'%s__gt' % self._mptt_meta.level_attr: root.get_level()})
if root is not None:
qs = qs.filter(**{'%s__gt' % self._mptt_meta.level_attr: root.get_level()})
- return pathsep.join([getattr(parent, field, '?') for parent in
list(qs) + [self]
])
+ return pathsep.join([getattr(parent, field, '?') for parent in
qs
])
path = property(get_path)
def __unicode__(self):
path = property(get_path)
def __unicode__(self):