delete empty inputs fields to clear error on credential form

This commit is contained in:
Haokun-Chen
2018-06-18 16:48:41 -04:00
parent 7aa835abd4
commit fe31f54778
2 changed files with 6 additions and 0 deletions

View File

@@ -113,6 +113,9 @@ function EditCredentialsController (models, $state, $scope, strings, componentsS
delete data.inputs[gceFileInputSchema.id];
}
const filteredInputs = _.omit(data.inputs, (value) => value === '');
data.inputs = filteredInputs;
return credential.request('put', { data });
};