Commit c54fd2be authored by Vincent Pelletier's avatar Vincent Pelletier

Revert commit 18557.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18558 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent aadca61e
...@@ -212,22 +212,20 @@ class XMLMatrix(Folder): ...@@ -212,22 +212,20 @@ class XMLMatrix(Folder):
# List all valid cell ids for current base_id. # List all valid cell ids for current base_id.
object_id_list = [] object_id_list = []
base_id_len = len(base_id) for obj in self.objectValues():
for object_id in self.objectIds(): object_id = obj.getId()
object_id_list = object_id.split('_') if object_id.find(base_id) == 0:
if len(object_id_list) > 1 and object_id_list.pop(0) == base_id: # Check that all '_'-separated fields are of int type.
try: if (object_id) > len(base_id):
# Check that all '_'-separated fields are of int type (once try:
# base_id is poped). int(object_id[len(base_id)+1:].split('_')[0])
[int(x) for x in object_id_list] test = self._getOb(object_id) # If the object was created
self._getOb(object_id) # If the object was created # during this transaction,
# during this transaction, # then we do not need to
# then we do not need to # work on it
# work on it object_id_list.append(object_id)
except (ValueError, KeyError): except (ValueError, KeyError):
pass pass
else:
object_id_list.append(object_id)
# Prepend 'temp_' to all cells, to avoid id conflicts while renaming. # Prepend 'temp_' to all cells, to avoid id conflicts while renaming.
for object_id in object_id_list: for object_id in object_id_list:
......
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