Dynamic links do not have a menu position entry. Use .get to avoid error on non existant entries.

This commit is contained in:
Roberto Rosario
2015-10-07 02:43:01 -04:00
parent 8bdd4ba452
commit cbe77ee258

View File

@@ -170,7 +170,7 @@ class Menu(object):
# Sort links by position value passed during bind
result[0] = sorted(
result[0], key=lambda item: self.link_positions[item.link]
result[0], key=lambda item: self.link_positions.get(item.link)
)
return result