X-Git-Url: http://git.ithinksw.org/philo.git/blobdiff_plain/0fe338c484fdfd43a3cdc919c26a2de1307b141e..d8c7acf5c1153bb75c51b632ee6bf2d913448a3a:/models.py?ds=sidebyside diff --git a/models.py b/models.py index 265df32..b66c4c3 100644 --- a/models.py +++ b/models.py @@ -220,10 +220,10 @@ class InheritableTreeEntity(TreeEntity): return None def get_path(self, pathsep='/', field='slug'): - path = getattr(self.instance, field, '?') + path = getattr(self.instance, field, getattr(self.instance, 'slug', '?')) parent = self.parent while parent: - path = getattr(parent.instance, field, '?') + pathsep + path + path = getattr(parent.instance, field, getattr(parent.instance, 'slug', '?')) + pathsep + path parent = parent.parent return path path = property(get_path)