Commit 4eda5ae1 authored by Rafael Monnerat's avatar Rafael Monnerat

Fix when the Category is None and Diverge.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10599 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8b41538e
...@@ -82,19 +82,19 @@ class CategoryDivergenceTester(PropertyDivergenceTester): ...@@ -82,19 +82,19 @@ class CategoryDivergenceTester(PropertyDivergenceTester):
simulation_category_list.sort() simulation_category_list.sort()
if delivery_mvt_category_list != simulation_category_list: if delivery_mvt_category_list != simulation_category_list:
delivery_mvt_category_title_list = [] delivery_mvt_category_title_list = []
for mvt_category in delivery_mvt_category_list: for mvt_category in delivery_mvt_category_list:
category_value = delivery_mvt.resolveCategory(mvt_category) category_value = delivery_mvt.resolveCategory(mvt_category)
if category_value is not None:
if category_value.getPortalType() == 'Category': if category_value.getPortalType() == 'Category':
delivery_mvt_category_title_list.append(category_value.getTranslatedTitle()) delivery_mvt_category_title_list.append(category_value.getTranslatedTitle())
else: else:
delivery_mvt_category_title_list.append(category_value.getTitle()) delivery_mvt_category_title_list.append(category_value.getTitle())
simulation_category_title_list = [] simulation_category_title_list = []
for mvt_category in simulation_category_list: for mvt_category in simulation_category_list:
category_value = delivery_mvt.resolveCategory(mvt_category) category_value = delivery_mvt.resolveCategory(mvt_category)
if category_value is not None:
if category_value.getPortalType() == 'Category': if category_value.getPortalType() == 'Category':
simulation_category_title_list.append(category_value.getTranslatedTitle()) simulation_category_title_list.append(category_value.getTranslatedTitle())
else: else:
......
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