From 9ef8a32450e005af7b24d8ed1dc6dcf394445e68 2016-01-12 18:56:51 From: Miguel Valdez Date: 2016-01-12 18:56:51 Subject: [PATCH] --- diff --git a/schainpy/controller.py b/schainpy/controller.py index f662351..4496d38 100644 --- a/schainpy/controller.py +++ b/schainpy/controller.py @@ -829,8 +829,18 @@ class Project(): def __getNewId(self): - id = int(self.id)*10 + len(self.procUnitConfObjDict) + 1 + idList = self.procUnitConfObjDict.keys() + id = int(self.id)*10 + + while True: + id += 1 + + if str(id) in idList: + continue + + break + return str(id) def getElementName(self):