Merge pull request #3579 from strongloop/persisted-model/fix-updateonly-props-check

Handle missing getUpdateOnlyProperties fn
This commit is contained in:
Kevin Delisle 2017-08-23 10:48:19 -04:00 committed by GitHub
commit 8bff145c65
1 changed files with 2 additions and 1 deletions

View File

@ -630,7 +630,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;
// This is just for LB 3.x