Commit acae1518 authored by Ayush Tiwari's avatar Ayush Tiwari

bt5_config: Generate UUID for id of Business Commit and Business Item

parent 3eaef7e6
......@@ -39,6 +39,7 @@ import fnmatch
import re
import threading
import pprint
import uuid
from copy import deepcopy
from collections import defaultdict
......@@ -115,9 +116,6 @@ class BusinessCommit(Folder):
Also, copy the objects in the Business Commit after creating new object
"""
if id is None:
id = self.generateNewId()
id = uuid.uuid1()
id = str(str(id) + '_' + str(time.time())).replace('.', '')
new_object = super(BusinessCommit, self).newContent(id, **kw)
return new_object
return super(BusinessCommit, self).newContent(id, **kw)
......@@ -37,6 +37,7 @@ import sys
import hashlib
import pprint
import transaction
import uuid
from Acquisition import Implicit, Explicit
from AccessControl import ClassSecurityInfo
......@@ -183,9 +184,8 @@ class CommitTool (BaseTool):
Override newContent so as to use 'id' generated like hash
"""
if id is None:
id = self.generateNewId()
id = uuid.uuid1()
id = str(str(id) + '_' + str(time.time())).replace('.', '')
new_obj = super(CommitTool, self).newContent(id, **kw)
# Add the last commit as its predecessor
......
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