Commit 40220b0b authored by Sebastien Robin's avatar Sebastien Robin

ERP5Type: id_as_reference.__migrate is now dead code, remove it

parent e58efba6
...@@ -44,22 +44,6 @@ def IdAsReferenceMixin(suffix): ...@@ -44,22 +44,6 @@ def IdAsReferenceMixin(suffix):
def cb_isMoveable(self): def cb_isMoveable(self):
return self.cb_userHasCopyOrMovePermission() return self.cb_userHasCopyOrMovePermission()
def __migrate(self):
if self.id[suffix_index:] != suffix:
new_id = self.__dict__.get('default_reference') + suffix
parent = self.getParentValue()
if parent.has_key(new_id):
LOG("IdAsReferenceMixin", WARNING, "Skipping migration of %r in %r"
" property sheet, due to ID conflict" % (new_id, parent.getId()))
else:
try:
self.setId(new_id)
del self.default_reference
except ActivityPendingError:
LOG("IdAsReferenceMixin", WARNING, "Skipping migration of %r in %r"
" property sheet, due to pending activities" %
(new_id, parent.getId()))
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'getIdAsReferenceSuffix') 'getIdAsReferenceSuffix')
@staticmethod @staticmethod
......
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