This upgrades XBlock, which now contains a default index_dictionary method.

This commit is contained in:
Dave St.Germain
2020-08-06 11:31:57 -04:00
parent c0339a0b78
commit f259c91efb
6 changed files with 4 additions and 64 deletions

View File

@@ -178,8 +178,7 @@ class SearchIndexerBase(object, metaclass=ABCMeta):
Returns:
item_content_groups - content groups assigned to indexed item
"""
is_indexable = hasattr(item, "index_dictionary")
item_index_dictionary = item.index_dictionary() if is_indexable else None
item_index_dictionary = item.index_dictionary()
# if it's not indexable and it does not have children, then ignore
if not item_index_dictionary and not item.has_children:
return