Commit 720a5df4 authored by Nicolas Dumazet's avatar Nicolas Dumazet

small boolean cleanup


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35588 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 518336b0
...@@ -112,7 +112,7 @@ class CopyContainer: ...@@ -112,7 +112,7 @@ class CopyContainer:
self._updateInternalRelatedContent(object=subobject, self._updateInternalRelatedContent(object=subobject,
path_item_list=path_item_list, path_item_list=path_item_list,
new_id=new_id) new_id=new_id)
changed = 0 changed = False
category_list = object.getCategoryList() category_list = object.getCategoryList()
path_len = len(path_item_list) path_len = len(path_item_list)
for position in xrange(len(category_list)): for position in xrange(len(category_list)):
...@@ -120,8 +120,8 @@ class CopyContainer: ...@@ -120,8 +120,8 @@ class CopyContainer:
if category_name[1:path_len + 1] == path_item_list: # XXX Should be possible to do this in a cleaner way if category_name[1:path_len + 1] == path_item_list: # XXX Should be possible to do this in a cleaner way
category_name[path_len] = new_id category_name[path_len] = new_id
category_list[position] = '/'.join(category_name) category_list[position] = '/'.join(category_name)
changed = 1 changed = True
if changed != 0: if changed:
object.setCategoryList(category_list) object.setCategoryList(category_list)
def _recursiveSetActivityAfterTag(self, obj, activate_kw=None): def _recursiveSetActivityAfterTag(self, obj, activate_kw=None):
......
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