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.
......@@ -490,7 +491,8 @@ class Folder(CopyContainer, CMFBTreeFolder, CMFHBTreeFolder, Base, FolderMixIn,
# 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
# got a right id
self.setIdGenerator(new_generate_id_method)
if new_generate_id_method is not None:
self.setIdGenerator(new_generate_id_method)
if migration_generate_id_method not in (None, ''):
tag = "%s/%s/migrate" %(self.getId(),migration_generate_id_method)
id_list = list(self.objectIds())
......
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