mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 03:10:42 -03:30
fix team, credential, and workflow copy regressions
This commit is contained in:
parent
939666f172
commit
01d9c8546e
@ -11,7 +11,7 @@ function CredentialsResolve ($q, $stateParams, Me, Credential, CredentialType, O
|
||||
const id = $stateParams.credential_id;
|
||||
|
||||
const promises = {
|
||||
me: new Me('get').then((me) => me.extend('admin_of_organizations'))
|
||||
me: new Me('get').then((me) => me.extend('get', 'admin_of_organizations'))
|
||||
};
|
||||
|
||||
if (!id) {
|
||||
|
||||
@ -80,10 +80,10 @@ function resolveResource (
|
||||
const promises = [model.getStats()];
|
||||
|
||||
if (model.has('related.labels')) {
|
||||
promises.push(model.extend('labels'));
|
||||
promises.push(model.extend('get', 'labels'));
|
||||
}
|
||||
|
||||
promises.push(model.extend(related, config));
|
||||
promises.push(model.extend('get', related, config));
|
||||
|
||||
return Promise.all(promises);
|
||||
})
|
||||
|
||||
@ -353,8 +353,8 @@ function has (method, keys) {
|
||||
return value !== undefined && value !== null;
|
||||
}
|
||||
|
||||
function extend (related, config = {}) {
|
||||
const req = this.parseRequestConfig('GET', config);
|
||||
function extend (method, related, config = {}) {
|
||||
const req = this.parseRequestConfig(method.toUpperCase(), config);
|
||||
|
||||
if (_.get(config, 'params.page_size')) {
|
||||
this.page.size = config.params.page_size;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user