Commit 5c79424f authored by Aurel's avatar Aurel

check value not none at uninstall of business template


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4961 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7af6edec
...@@ -1341,7 +1341,7 @@ class CatalogMethodTemplateItem(ObjectTemplateItem): ...@@ -1341,7 +1341,7 @@ class CatalogMethodTemplateItem(ObjectTemplateItem):
values.append(self._objects[key]) values.append(self._objects[key])
else: else:
values.append(self._archive[key]) values.append(self._archive[key])
for obj in values: for obj in values:
method_id = obj.id method_id = obj.id
...@@ -1404,14 +1404,16 @@ class CatalogMethodTemplateItem(ObjectTemplateItem): ...@@ -1404,14 +1404,16 @@ class CatalogMethodTemplateItem(ObjectTemplateItem):
values = self._objects.values() values = self._objects.values()
else: else:
values = self._archive.values() values = self._archive.values()
else: else:
values.append(self._archive[object_path]) value = self._archive[object_path]
if value is not None:
values.append(value)
# Make copies of attributes of the default catalog of portal_catalog. # Make copies of attributes of the default catalog of portal_catalog.
sql_catalog_object_list = list(catalog.sql_catalog_object_list) sql_catalog_object_list = list(catalog.sql_catalog_object_list)
sql_uncatalog_object = list(catalog.sql_uncatalog_object) sql_uncatalog_object = list(catalog.sql_uncatalog_object)
sql_clear_catalog = list(catalog.sql_clear_catalog) sql_clear_catalog = list(catalog.sql_clear_catalog)
for obj in values: for obj in values:
method_id = obj.id method_id = obj.id
if method_id in sql_catalog_object_list: if method_id in sql_catalog_object_list:
sql_catalog_object_list.remove(method_id) sql_catalog_object_list.remove(method_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