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
29e89f50e5
commit
16ede97033
|
@ -630,7 +630,8 @@ module.exports = function(registry) {
|
||||||
// if there is atleast one updateOnly property, then we set
|
// if there is atleast one updateOnly property, then we set
|
||||||
// createOnlyInstance flag in __create__ to indicate loopback-swagger
|
// createOnlyInstance flag in __create__ to indicate loopback-swagger
|
||||||
// code to create a separate model instance for create operation only
|
// 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;
|
const hasUpdateOnlyProps = updateOnlyProps && updateOnlyProps.length > 0;
|
||||||
|
|
||||||
// This is just for LB 3.x
|
// This is just for LB 3.x
|
||||||
|
|
Loading…
Reference in New Issue