q-koa 11.4.4 → 11.4.5

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.
package/core/app.js CHANGED
@@ -1826,7 +1826,20 @@ class APP {
1826
1826
  ? ['updated_at']
1827
1827
  : ['created_at', 'updated_at']
1828
1828
 
1829
- const newData = _.omit(_.omitBy(ctx.request.body, _.isNull), _exclude)
1829
+ const newData = _.omit(
1830
+ _.omitBy(
1831
+ ctx.request.body,
1832
+ (value, key) =>
1833
+ _.isNull(value) &&
1834
+ !(
1835
+ ctx.app[appName].attributes &&
1836
+ ctx.app[appName].attributes[controller] &&
1837
+ ctx.app[appName].attributes[controller][key] &&
1838
+ ctx.app[appName].attributes[controller][key].allowNull
1839
+ )
1840
+ ),
1841
+ _exclude
1842
+ )
1830
1843
 
1831
1844
  const flag = await app[appName].model[controller][fn]({
1832
1845
  createdid: ctx.request[`${appName}-user`]
@@ -6,6 +6,7 @@ const axios = require('axios')
6
6
  exports.initData = async ({ includes, excludes, app, ctx }) => {
7
7
  const appConfig = getConfig(app)
8
8
  const { version: cacheVersion } = await appConfig.getObject('base')
9
+
9
10
  const apiVersion = ctx.request.header.version
10
11
  const config = ctx.request.header.config
11
12
 
@@ -275,6 +276,9 @@ exports.initData = async ({ includes, excludes, app, ctx }) => {
275
276
  }),
276
277
  {}
277
278
  )
279
+ if (obj.setting && apiVersion && !cacheVersion) {
280
+ console.log(`version没有后端缓存`)
281
+ }
278
282
  if (obj.setting && apiVersion && cacheVersion) {
279
283
  let target = null
280
284
  if (config) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "q-koa",
3
- "version": "11.4.4",
3
+ "version": "11.4.5",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {