bookshelf-modelbase-plus
Advanced tools
Comparing version 2.11.1 to 2.11.2
@@ -31,8 +31,5 @@ const _ = require('lodash'); | ||
if (!this.validate.isJoi) { | ||
this.validate = Joi.object({ | ||
...baseValidation, | ||
...this.validate | ||
}); | ||
} | ||
this.validate = this.validate.isJoi | ||
? this.validate.keys(baseValidation) | ||
: Joi.object(this.validate).keys(baseValidation); | ||
@@ -636,3 +633,3 @@ if (this.validateSave) { | ||
if (!beforeUpdates[item[idAttribute]]) { | ||
beforeUpdates[item[idAttribute]] = existing; | ||
beforeUpdates[item[idAttribute]] = _.clone(existing); | ||
} | ||
@@ -829,4 +826,6 @@ existing[col] = item[col]; | ||
.then(rows => rows.map((r) => { | ||
const item = this.forge(this.transformBinaryToPouuid(r)); | ||
item._savedAttributes = previous && previous[item[idAttribute]]; | ||
const transformed = this.transformBinaryToPouuid(r); | ||
const item = this.forge(transformed); | ||
item._savedAttributes = transformed; | ||
item._previousAttributes = previous && previous[item[idAttribute]]; | ||
return item; | ||
@@ -833,0 +832,0 @@ })) |
{ | ||
"name": "bookshelf-modelbase-plus", | ||
"version": "2.11.1", | ||
"version": "2.11.2", | ||
"description": "Extended functionality for REST operations with validation, filtering, ordering, importing records.", | ||
@@ -49,3 +49,3 @@ "main": "./lib", | ||
"dependencies": { | ||
"joi": "^14.3.1", | ||
"joi": ">=9.x <=14.x", | ||
"lodash": "^4.17.4" | ||
@@ -52,0 +52,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
85361
1650
Updatedjoi@>=9.x <=14.x