We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 965bcaf + 5a8944d commit 6a1a9eaCopy full SHA for 6a1a9ea
menus/base.py
@@ -49,7 +49,7 @@ def get_absolute_url(self):
49
return self.url
50
51
def get_attribute(self, name):
52
- return self.attr[name]
+ return self.attr.get(name)
53
54
def get_descendants(self):
55
nodes = []
@@ -63,4 +63,4 @@ def get_ancestors(self):
63
if getattr(self, 'parent', None):
64
nodes.append(self.parent)
65
nodes += self.parent.get_ancestors()
66
- return nodes
+ return nodes
0 commit comments