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,11 +329,12 @@ class TestImmobilisationMixin(TestOrderMixin, ERP5TypeTestCase):
Create a category tree
"""
for category, codification, vault_type, new_tree in category_tree:
new_category = current_category.newContent(portal_type='Category',
id=category,
codification=codification)
new_category.setVaultType(vault_type)
self.createCategorySiteTree(new_category, new_tree)
if category not in current_category.objectIds():
new_category = current_category.newContent(portal_type='Category',
id=category,
codification=codification)
new_category.setVaultType(vault_type)
self.createCategorySiteTree(new_category, new_tree)
def createCurrency(self):
currency_module = self.getCurrencyModule()
......
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