mirror of
https://github.com/ansible/awx.git
synced 2026-01-17 12:41:19 -03:30
Merge pull request #743 from jakemcdermott/gcp-service-file
fix submit when no input object defined
This commit is contained in:
commit
ee0aa40542
@ -58,7 +58,9 @@ function AddCredentialsController (models, $state, $scope, strings, componentsSt
|
||||
vm.form.save = data => {
|
||||
data.user = me.get('id');
|
||||
|
||||
delete data.inputs[gceFileInputSchema.id];
|
||||
if (_.get(data.inputs, gceFileInputSchema.id)) {
|
||||
delete data.inputs[gceFileInputSchema.id];
|
||||
}
|
||||
|
||||
return credential.request('post', { data });
|
||||
};
|
||||
|
||||
@ -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 });
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user