mirror of
https://github.com/ansible/awx.git
synced 2024-10-31 23:51:09 +03:00
delete empty inputs fields to clear error on credential form
This commit is contained in:
parent
7aa835abd4
commit
fe31f54778
@ -62,6 +62,9 @@ function AddCredentialsController (models, $state, $scope, strings, componentsSt
|
||||
delete data.inputs[gceFileInputSchema.id];
|
||||
}
|
||||
|
||||
const filteredInputs = _.omit(data.inputs, (value) => value === '');
|
||||
data.inputs = filteredInputs;
|
||||
|
||||
return credential.request('post', { data });
|
||||
};
|
||||
|
||||
|
@ -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 });
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user