Commit 895fa1ec authored by Sebastien Robin's avatar Sebastien Robin

we should use newContent in category tool now


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2265 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ae467014
......@@ -39,7 +39,6 @@ from Products.ERP5Type.Utils import readLocalDocument, writeLocalDocument, impor
from Products.ERP5Type.XMLObject import XMLObject
import cStringIO
from Products.ERP5Type.Cache import clearCache
from Products.ERP5.Tool.Category import addBaseCategory
from zLOG import LOG
......@@ -201,8 +200,7 @@ class CategoryTemplateItem(ObjectTemplateItem):
for category_id in self._light_archive.keys():
if category_id in category_tool.objectIds():
raise TemplateConflictError, 'the category %s already exists' % id
addBaseCategory(category_tool, category_id)
category = category_tool[category_id]
category = category_tool.newContent(portal_type='Base Category',id=category_id)
property_list = self._light_archive[category_id]['property_list']
for property,value in property_list.items():
category.setProperty(property,value)
......
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