Fix CombinedSource logic after get_multi_item_links_form updates

This commit is contained in:
Roberto Rosario
2015-04-06 02:23:04 -04:00
parent 920ed6601a
commit 35b44e70c7

View File

@@ -87,12 +87,13 @@ class Menu(object):
for resolved_navigation_object in resolved_navigation_object_list:
for source, links in self.bound_links.iteritems():
try:
if inspect.isclass(source) and isinstance(resolved_navigation_object, source) or source == CombinedSource(obj=resolved_navigation_object, view=current_view):
if inspect.isclass(source) and isinstance(resolved_navigation_object, source) or source == CombinedSource(obj=resolved_navigation_object.__class__, view=current_view):
for link in links:
resolved_link = link.resolve(context=context, resolved_object=resolved_navigation_object)
if resolved_link:
result.append(resolved_link)
#break # No need for further content object match testing
# TODO: profile this
except TypeError:
# When source is a dictionary