Commit 23a9bbaa authored by Jérome Perrin's avatar Jérome Perrin

check if category is present before creating it


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25774 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0eee3ba1
...@@ -1353,6 +1353,8 @@ class TestPropertySheet: ...@@ -1353,6 +1353,8 @@ class TestPropertySheet:
self.assertEquals(self.getPersonModule(), copy.getParentValue()) self.assertEquals(self.getPersonModule(), copy.getParentValue())
# Test category accessor # Test category accessor
gender = self.getCategoryTool().gender._getOb('male', None)
if gender is None:
gender = self.getCategoryTool().gender.newContent( gender = self.getCategoryTool().gender.newContent(
portal_type='Category', id='male') portal_type='Category', id='male')
# Category can not be used as asContext parameter # Category can not be used as asContext parameter
......
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