mirror of
https://github.com/ansible/awx.git
synced 2026-05-19 14:57:39 -02:30
make credential association cause deferral of jt promise chain
This commit is contained in:
@@ -500,7 +500,7 @@ export default
|
|||||||
null, true);
|
null, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
MultiCredentialService
|
var credDefer = MultiCredentialService
|
||||||
.saveRelated(jobTemplateData, $scope.multiCredential.selectedCredentials);
|
.saveRelated(jobTemplateData, $scope.multiCredential.selectedCredentials);
|
||||||
|
|
||||||
InstanceGroupsService.editInstanceGroups(instance_group_url, $scope.instance_groups)
|
InstanceGroupsService.editInstanceGroups(instance_group_url, $scope.instance_groups)
|
||||||
@@ -580,7 +580,7 @@ export default
|
|||||||
|
|
||||||
Rest.setUrl(data.related.labels);
|
Rest.setUrl(data.related.labels);
|
||||||
|
|
||||||
var defers = [];
|
var defers = [credDefer];
|
||||||
for (var i = 0; i < toPost.length; i++) {
|
for (var i = 0; i < toPost.length; i++) {
|
||||||
defers.push(Rest.post(toPost[i]));
|
defers.push(Rest.post(toPost[i]));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ function MultiCredentialService (Rest, ProcessErrors, $q, GetBasePath) {
|
|||||||
|
|
||||||
return $q.all(disassociationPromises).then(() => {
|
return $q.all(disassociationPromises).then(() => {
|
||||||
_.each(selected.filter(id => currentlyAssociated.indexOf(id) < 0), (id) => {
|
_.each(selected.filter(id => currentlyAssociated.indexOf(id) < 0), (id) => {
|
||||||
associate({related}, id);
|
return associate({related}, id);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user