owl-cli 6.97.0 → 6.99.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -471,14 +471,22 @@ var @projectCodeService = (function (pigeon) {
|
|
|
471
471
|
var parentId = treeNode.parent_id;
|
|
472
472
|
var parentPathIds = [];
|
|
473
473
|
var parentPathNames = [];
|
|
474
|
+
var nSteps = 0;
|
|
474
475
|
//获得parentId对应的node
|
|
475
476
|
while(parentId && parentId!=='0'){
|
|
477
|
+
nSteps++;
|
|
478
|
+
if(nSteps>15){
|
|
479
|
+
break;
|
|
480
|
+
}
|
|
476
481
|
var parentNode = f.get(parentId);
|
|
477
482
|
if(parentNode){
|
|
478
483
|
parentPathIds.push(parentNode.id);
|
|
479
484
|
parentPathNames.push(parentNode.name);
|
|
480
485
|
parentId = parentNode.parent_id;
|
|
481
486
|
}
|
|
487
|
+
else{
|
|
488
|
+
break;
|
|
489
|
+
}
|
|
482
490
|
}
|
|
483
491
|
|
|
484
492
|
treeNode.parentPathIds = parentPathIds;
|
|
@@ -492,7 +500,7 @@ var @projectCodeService = (function (pigeon) {
|
|
|
492
500
|
throw JSON.stringify(ret);
|
|
493
501
|
}
|
|
494
502
|
|
|
495
|
-
|
|
503
|
+
|
|
496
504
|
data['owl_createTime'] = new Date().getTime();
|
|
497
505
|
data['owl_modifyTime'] = new Date().getTime();
|
|
498
506
|
data['_v'] = 0
|
|
@@ -504,6 +512,7 @@ var @projectCodeService = (function (pigeon) {
|
|
|
504
512
|
}
|
|
505
513
|
pigeon.lock(f.getLock(data))
|
|
506
514
|
EventBusService.fire(spec['_t'] + '_add_before', {data: data, env: env})
|
|
515
|
+
data.id = f.getId(data)
|
|
507
516
|
f.saveUniqueFields(data, env)
|
|
508
517
|
pigeon.saveObject(data.id, data)
|
|
509
518
|
f.addToList(data)
|