q-koa 11.7.0 → 11.8.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.
Files changed (2) hide show
  1. package/core/app.js +6 -29
  2. package/package.json +1 -1
package/core/app.js CHANGED
@@ -797,13 +797,9 @@ class APP {
797
797
  Array.isArray(
798
798
  this.app[appName].attributes[model][model1 + '_id'].defaultValue
799
799
  )) ||
800
- (this.app[appName].attributes[model][model1 + '_id'].type &&
801
- this.app[appName].attributes[model][model1 + '_id'].type ===
802
- 'JSON') ||
803
- (this.app[appName].attributes[model][model1 + '_id'].type &&
804
- this.app[appName].attributes[model][model1 + '_id'].type.key &&
805
- this.app[appName].attributes[model][model1 + '_id'].type.key ===
806
- 'JSON')
800
+ this.app[appName].attributes[model][model1 + '_id'].type ===
801
+ Sequelize.DataTypes.JSON
802
+
807
803
  if (!is_multiple) {
808
804
  this.app[appName].model[model].hasOne(
809
805
  this.app[appName].model[model1],
@@ -1385,13 +1381,7 @@ class APP {
1385
1381
  (app[appName].attributes[controller][modelName + '_id']
1386
1382
  .type &&
1387
1383
  app[appName].attributes[controller][modelName + '_id']
1388
- .type === 'JSON') ||
1389
- (app[appName].attributes[controller][modelName + '_id']
1390
- .type &&
1391
- app[appName].attributes[controller][modelName + '_id']
1392
- .type.key &&
1393
- app[appName].attributes[controller][modelName + '_id']
1394
- .type.key === 'JSON')
1384
+ .type === Sequelize.DataTypes.JSON)
1395
1385
  )
1396
1386
  if (is_single) {
1397
1387
  rows[i].setDataValue(
@@ -1544,13 +1534,7 @@ class APP {
1544
1534
  (app[appName].attributes[controller][modelName + '_id']
1545
1535
  .type &&
1546
1536
  app[appName].attributes[controller][modelName + '_id']
1547
- .type === 'JSON') ||
1548
- (app[appName].attributes[controller][modelName + '_id']
1549
- .type &&
1550
- app[appName].attributes[controller][modelName + '_id']
1551
- .type.key &&
1552
- app[appName].attributes[controller][modelName + '_id']
1553
- .type.key === 'JSON')
1537
+ .type === Sequelize.DataTypes.JSON)
1554
1538
  )
1555
1539
 
1556
1540
  if (is_single) {
@@ -1620,14 +1604,7 @@ class APP {
1620
1604
  app[appName].attributes[controller][modelName + '_id']
1621
1605
  .type &&
1622
1606
  app[appName].attributes[controller][modelName + '_id']
1623
- .type === 'JSON') ||
1624
- (app[appName].attributes[controller][modelName + '_id'] &&
1625
- app[appName].attributes[controller][modelName + '_id']
1626
- .type &&
1627
- app[appName].attributes[controller][modelName + '_id'].type
1628
- .key &&
1629
- app[appName].attributes[controller][modelName + '_id'].type
1630
- .key === 'JSON')
1607
+ .type === Sequelize.DataTypes.JSON)
1631
1608
  )
1632
1609
 
1633
1610
  if (is_single) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "q-koa",
3
- "version": "11.7.0",
3
+ "version": "11.8.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {