Commit acff071e authored by Sebastien Robin's avatar Sebastien Robin

check if the category already exists

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13425 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b8417f2c
...@@ -329,6 +329,7 @@ class TestImmobilisationMixin(TestOrderMixin, ERP5TypeTestCase): ...@@ -329,6 +329,7 @@ class TestImmobilisationMixin(TestOrderMixin, ERP5TypeTestCase):
Create a category tree Create a category tree
""" """
for category, codification, vault_type, new_tree in category_tree: for category, codification, vault_type, new_tree in category_tree:
if category not in current_category.objectIds():
new_category = current_category.newContent(portal_type='Category', new_category = current_category.newContent(portal_type='Category',
id=category, id=category,
codification=codification) codification=codification)
......
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