Merge pull request #3647 from lehni/model/fix-updateonly-props-check
Handle missing getUpdateOnlyProperties fn on Model
This commit is contained in:
commit
fb8f3d9df3
|
@ -766,7 +766,8 @@ module.exports = function(registry) {
|
|||
// if there is atleast one updateOnly property, then we set
|
||||
// createOnlyInstance flag in __create__ to indicate loopback-swagger
|
||||
// code to create a separate model instance for create operation only
|
||||
const updateOnlyProps = this.getUpdateOnlyProperties();
|
||||
const updateOnlyProps = this.getUpdateOnlyProperties ?
|
||||
this.getUpdateOnlyProperties() : false;
|
||||
const hasUpdateOnlyProps = updateOnlyProps && updateOnlyProps.length > 0;
|
||||
|
||||
var isStatic = scope.isStatic;
|
||||
|
|
Loading…
Reference in New Issue