fix submit when no input object defined

This commit is contained in:
Jake McDermott
2017-11-29 19:50:46 -05:00
parent dbb9ffbaf4
commit 81f2184aa7
2 changed files with 6 additions and 2 deletions

View File

@@ -108,7 +108,9 @@ function EditCredentialsController (models, $state, $scope, strings, componentsS
data.user = me.get('id');
credential.unset('inputs');
delete data.inputs[gceFileInputSchema.id];
if (_.get(data.inputs, gceFileInputSchema.id)) {
delete data.inputs[gceFileInputSchema.id];
}
return credential.request('put', { data });
};