Commit fd35367c authored by Georgios Dagkakis's avatar Georgios Dagkakis Committed by Jérome Perrin

main script updated so that if no order decomposition is assigned to the JSON...

main script updated so that if no order decomposition is assigned to the JSON route it will pick one randomly
parent 294c28e3
......@@ -943,6 +943,23 @@ def createWIP():
if key not in ('_class', 'id'):
extraPropertyDict[key] = value
#Below it is to assign an order decomposition if it was not assigned in JSON
#have to talk about it with NEX
odAssigned=False
for element in route:
elementId=element[0]
for obj in G.ObjList:
if obj.id==elementId and obj.type=='OrderDecomposition':
odAssigned=True
if not odAssigned:
odId=None
for obj in G.ObjList:
if obj.type=='OrderDecomposition':
odId=obj.id
break
if odId:
route.append([odId, 0])
# initiate the Order
O=Order(id, name, route, priority=priority, dueDate=dueDate,
isCritical=isCritical, basicsEnded=basicsEnded, manager=manager, componentsList=componentsList,
......
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