Handle missing getUpdateOnlyProperties fn
If the current scope does not define a getUpdateOnlyProperties function, the updateOnlyProps value will now be set to false.
This commit is contained in:
parent
8488da2e26
commit
826ee2aca8
|
@ -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