owl-cli 6.170.0 → 6.171.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.
@@ -75,6 +75,22 @@ function main(){
75
75
  else{
76
76
  rec = row;
77
77
  }
78
+ if(!rec._orgId){
79
+ rec._orgId = batchImport._orgId;
80
+ rec._orgIds = batchImport._orgIds;
81
+ }
82
+ if(rec._orgId!=batchImport._orgId && batchImport._orgId!='0'){
83
+ throw "记录的_orgId不正确,应该是" + batchImport._orgId + ",实际是" + rec._orgId;
84
+ }
85
+
86
+ //检查
87
+ var oldObj = @projectCodeService.get(rec.id);
88
+ if(oldObj && override!="true"){
89
+ throw "记录已经存在,id=" + rec.id;
90
+ }
91
+ if(oldObj && override=="true" && oldObj._orgId!=rec._orgId){
92
+ throw "记录的_orgId不正确,不能覆盖其他人的数据,应该是" + rec._orgId + ",实际是" + oldObj._orgId;
93
+ }
78
94
  @projectCodeService.add( rec);
79
95
  nImported++;
80
96
 
@@ -122,6 +138,9 @@ function main(){
122
138
  }
123
139
  else{
124
140
  msg = e.msg;
141
+ if(!msg && e.getCause){
142
+ msg = e.getCause();
143
+ }
125
144
  }
126
145
  var now = new Date().getTime();
127
146
  var log = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "owl-cli",
3
- "version": "6.170.0",
3
+ "version": "6.171.0",
4
4
  "main": "index.js",
5
5
  "preferGlobal": true,
6
6
  "bin": {