Commit ee7eafb4 authored by Yusei Tahara's avatar Yusei Tahara

Fix getSortedCategoryList. Category may be a predicate located in non base category document.

parent 688cf160
......@@ -540,17 +540,16 @@ def updateCellList(portal, line, cell_type, cell_range_method, cell_dict_list):
return range_list
def getSortedCategoryList(line, base_id, category_list):
category_dict = {}
for category in category_list:
category_dict[category.split('/')[0]] = category
result = []
index_list = line.index[base_id].keys()
for index in index_list:
if line.index[base_id][index]:
base_category = line.index[base_id][index].keys()[0].split('/')[0]
return result
for category in category_list:
for index in index_list:
if line.index[base_id][index]:
if category in line.index[base_id][index]:
result.append((index, category))
return [category for index, category in result]
for cell_dict in cell_dict_list:
base_id = cell_dict['base_id']
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment