Commit fc5d21a1 authored by Łukasz Nowak's avatar Łukasz Nowak

- getattr is using acquisition, so in this case subcategories having same id...

 - getattr is using acquisition, so in this case subcategories having same id as base categories (eg. delivery) were not created


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28033 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 71b3a232
......@@ -80,7 +80,7 @@ class TestBPMMixin(ERP5TypeTestCase):
def createCategoriesInCategory(self, category, category_id_list):
for category_id in category_id_list:
if getattr(category,category_id,None) is None:
if not category.hasObject(category_id):
category.newContent(portal_type='Category', id = category_id,
title = category_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