Commit 6dd66a7e authored by Yoshinori Okuji's avatar Yoshinori Okuji

previous_security_uid was undefined.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16325 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 36ec1639
...@@ -989,12 +989,13 @@ class Catalog( Folder, ...@@ -989,12 +989,13 @@ class Catalog( Folder,
if id_tool is not None: if id_tool is not None:
default = 1 default = 1
# We must keep compatibility with existing sites # We must keep compatibility with existing sites
if getattr(self, 'security_uid_index', None) is not None: previous_security_uid = getattr(self, 'security_uid_index', None)
if previous_security_uid is not None:
# At some point, it was a Length # At some point, it was a Length
if isinstance(previous_security_uid, Length): if isinstance(previous_security_uid, Length):
default = previous_security_uid() + 1 default = previous_security_uid() + 1
else: else:
default = self.security_uid_index default = previous_security_uid
security_uid = id_tool.generateNewLengthId(id_group='security_uid_index', security_uid = id_tool.generateNewLengthId(id_group='security_uid_index',
default=default) default=default)
else: else:
......
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