Commit 5c0b5259 authored by Vincent Pelletier's avatar Vincent Pelletier

Fix problem found when generating ids inside a WebSite, because of special aq_dynamic function.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@9348 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6af21b06
......@@ -155,7 +155,7 @@ class FolderMixIn(ExtensionClass.Base, CopyContainer):
id_group = self.getIdGroup()
if id_group in (None, 'None'):
id_generator = self.getIdGenerator()
if isinstance(id_generator, str):
if isinstance(id_generator, str) and id_generator != '': # Custom aq_dynamic function (like the one defined on WebSite objects) can find an object which has no name. So we must recognise the default value of id_generator.
idGenerator = getattr(self, id_generator, None)
if idGenerator is None:
idGenerator = self._generateNextId
......
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