Improve how unbounded links are calculated and removed from results.

This commit is contained in:
Roberto Rosario
2015-09-27 01:42:12 -04:00
parent 62ecc32ad5
commit b335f70e57

View File

@@ -154,8 +154,12 @@ class Menu(object):
result.append(resolved_links)
if result:
unbound_links = []
unbound_links.extend(self.unbound_links.get(source, ()))
unbound_links.extend(self.unbound_links.get(current_view, ()))
for resolved_link in result[0]:
if resolved_link.link in self.unbound_links.get(source, ()):
if resolved_link.link in unbound_links:
result[0].remove(resolved_link)
return result