Check whether getUpdateOnlyProperties is a fn

This commit is contained in:
Chaitanya Bhagvan 2017-09-07 12:53:54 +05:30 committed by GitHub
parent 0f40ca8f8e
commit 131aafcef9
1 changed files with 1 additions and 1 deletions

View File

@ -761,7 +761,7 @@ 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;