Commit 4b5a928e by Russell Jones Committed by benjaoming

Convert iterator to list to allow extension with + operator

parent d88433d3
......@@ -102,7 +102,7 @@ class URLPath(MPTTModel):
def path(self):
if not self.parent: return ""
ancestors = filter(lambda ancestor: ancestor.parent is not None, self.cached_ancestors)
ancestors = list(filter(lambda ancestor: ancestor.parent is not None, self.cached_ancestors))
slugs = [obj.slug if obj.slug else "" for obj in ancestors + [self] ]
return "/".join(slugs) + "/"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment