owl-cli 6.63.0 → 6.65.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.
@@ -59,11 +59,10 @@ function diffArray(a1, a2,parentKeys){
59
59
 
60
60
  for(var i=0; i<a2.length; i++){
61
61
  var r2 = a2[i];
62
- if(!r2){
63
- a2[i] = {};
64
- r2 = a2[i];
62
+ if(isScalar(r2)){
63
+ delete r2._matched;
65
64
  }
66
- delete r2._matched;
65
+
67
66
  }
68
67
 
69
68
  for(var i=0; i<a1.length; i++){
@@ -61,7 +61,26 @@
61
61
  var newdata = @projectCodeService.add( modelObject,env );
62
62
  }
63
63
  else {
64
+
64
65
  modelObject._orgIds = [modelObject._orgId].concat(getParentOrgIds(modelObject._orgId));
66
+ //修复_orgIds
67
+ var _orgIds = [];
68
+ if(modelObject._orgIds){
69
+ modelObject._orgIds.forEach(function(orgId){
70
+ if(typeof orgId === 'string'){
71
+ _orgIds.push(orgId);
72
+ if(_orgIds.indexOf(orgId)===-1){
73
+ _orgIds.push(orgId);
74
+ }
75
+ }
76
+ else{
77
+ if(_orgIds.indexOf('0')===-1) {
78
+ _orgIds.push('0');
79
+ }
80
+ }
81
+ });
82
+ }
83
+ modelObject._orgIds = _orgIds;
65
84
  diffResult = diff(oldObj,modelObject,"");
66
85
  if(roleId!=='internal') {
67
86
  checkUpdatePermission(modelObject, diffResult, permissions, orgId);
@@ -345,7 +345,13 @@ var @projectCodeService = (function (pigeon) {
345
345
  return value
346
346
  }
347
347
  case 'date':
348
- return moment(value)
348
+ try{
349
+ return moment(value);
350
+ }
351
+ catch(e){
352
+ return null;
353
+ }
354
+
349
355
  case 'choice':
350
356
  return value
351
357
  default:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "owl-cli",
3
- "version": "6.63.0",
3
+ "version": "6.65.0",
4
4
  "main": "index.js",
5
5
  "preferGlobal": true,
6
6
  "bin": {