owl-cli 6.173.0 → 6.175.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.
@@ -553,12 +553,13 @@ var @projectCodeService = (function (pigeon) {
553
553
  data['_t'] = spec['_t']
554
554
  try {
555
555
  var meta = spec['#meta'];
556
- if(meta.isTree){
557
- f.updateParentPath(data);
558
- }
556
+
559
557
 
560
558
  EventBusService.fire(spec['_t'] + '_add_before', {data: data, env: env})
561
559
  data.id = f.getId(data)
560
+ if(meta.isTree){
561
+ f.updateParentPath(data);
562
+ }
562
563
  pigeon.lock(f.getLock(data))
563
564
  f.saveUniqueFields(data, env)
564
565
  pigeon.saveObject(data.id, data)
@@ -86,10 +86,10 @@ function main(){
86
86
 
87
87
  //检查
88
88
  var oldObj = @projectCodeService.get(rec.id);
89
- if(oldObj && batchImport.override!="true"){
89
+ if(oldObj && !batchImport.override){
90
90
  throw "记录已经存在,id=" + rec.id;
91
91
  }
92
- if(oldObj && batchImport.override=="true" && oldObj._orgId!=rec._orgId){
92
+ if(oldObj && batchImport.override==true && oldObj._orgId!=rec._orgId){
93
93
  throw "记录的_orgId不正确,不能覆盖其他人的数据,应该是" + rec._orgId + ",实际是" + oldObj._orgId;
94
94
  }
95
95
  @projectCodeService.add( rec);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "owl-cli",
3
- "version": "6.173.0",
3
+ "version": "6.175.0",
4
4
  "main": "index.js",
5
5
  "preferGlobal": true,
6
6
  "bin": {