Commit 1bc37152 authored by Nicolas Delaby's avatar Nicolas Delaby

Avoid overloading IdGenerator if it is not provided

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30526 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5b0ec46f
# -*- coding: utf-8 -*-
############################################################################## ##############################################################################
# #
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
...@@ -490,6 +491,7 @@ class Folder(CopyContainer, CMFBTreeFolder, CMFHBTreeFolder, Base, FolderMixIn, ...@@ -490,6 +491,7 @@ class Folder(CopyContainer, CMFBTreeFolder, CMFHBTreeFolder, Base, FolderMixIn,
# we may want to change all objects ids before migrating to new folder type # we may want to change all objects ids before migrating to new folder type
# set new id generator here so that object created while migration # set new id generator here so that object created while migration
# got a right id # got a right id
if new_generate_id_method is not None:
self.setIdGenerator(new_generate_id_method) self.setIdGenerator(new_generate_id_method)
if migration_generate_id_method not in (None, ''): if migration_generate_id_method not in (None, ''):
tag = "%s/%s/migrate" %(self.getId(),migration_generate_id_method) tag = "%s/%s/migrate" %(self.getId(),migration_generate_id_method)
......
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