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