From 01d9c8546e31f12d5de5ba7769ea87e8053586ca Mon Sep 17 00:00:00 2001 From: Jake McDermott Date: Wed, 4 Apr 2018 23:55:53 -0400 Subject: [PATCH] fix team, credential, and workflow copy regressions --- awx/ui/client/features/credentials/index.js | 2 +- awx/ui/client/features/output/index.js | 4 ++-- awx/ui/client/lib/models/Base.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/awx/ui/client/features/credentials/index.js b/awx/ui/client/features/credentials/index.js index 2fa094ef9f..e3a1ea7734 100644 --- a/awx/ui/client/features/credentials/index.js +++ b/awx/ui/client/features/credentials/index.js @@ -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) { diff --git a/awx/ui/client/features/output/index.js b/awx/ui/client/features/output/index.js index 9542b072ad..3aaadc2553 100644 --- a/awx/ui/client/features/output/index.js +++ b/awx/ui/client/features/output/index.js @@ -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); }) diff --git a/awx/ui/client/lib/models/Base.js b/awx/ui/client/lib/models/Base.js index 3aa507ce10..912d9a984c 100644 --- a/awx/ui/client/lib/models/Base.js +++ b/awx/ui/client/lib/models/Base.js @@ -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;