mirror of
https://github.com/ansible/awx.git
synced 2026-05-16 22:07:36 -02:30
Let disassociate jt cred requests finish before attempting to associate any new ones
This commit is contained in:
@@ -38,14 +38,11 @@ function MultiCredentialService (Rest, ProcessErrors, $q, GetBasePath) {
|
|||||||
.filter(id => selected.indexOf(id) < 0)
|
.filter(id => selected.indexOf(id) < 0)
|
||||||
.map(id => disassociate({ related }, id));
|
.map(id => disassociate({ related }, id));
|
||||||
|
|
||||||
const associationPromises = selected
|
return $q.all(disassociationPromises).then(() => {
|
||||||
.filter(id => currentlyAssociated.indexOf(id) < 0)
|
_.each(selected.filter(id => currentlyAssociated.indexOf(id) < 0), (id) => {
|
||||||
.map(id => associate({ related }, id));
|
associate({related}, id);
|
||||||
|
});
|
||||||
const promises = disassociationPromises
|
});
|
||||||
.concat(associationPromises);
|
|
||||||
|
|
||||||
return $q.all(promises);
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user