chore: 🤖 upgrade api addon to ember lts 3.20

This commit is contained in:
Randall Morey committed 2020-10-06 10:31:00 -04:00
1 parent cc37ea767a
commit 4f2ec5044b
16 files changed
+66 -107

No files matched your search

+1 -1
View File
@@ -16,7 +16,7 @@ export default class AccountModel extends GeneratedAccountModel {
* Convenience for getting username in account.
* @type {string}
*/
@computed('type', 'attributes.{login_name}')
@computed('type', 'attributes.login_name')
get username() {
let username = '';
switch (this.type) {
+1 -2
View File
@@ -1,7 +1,6 @@
import Model from '@ember-data/model';
import { fragment } from 'ember-data-model-fragments/attributes';
import { computed } from '@ember/object';
import { get } from '@ember/object';
/**
* Base model class provides common functionality for all models.
@@ -51,7 +50,7 @@ export default class BaseModel extends Model {
*/
@computed('scope.scope_id')
get scopeID() {
return get(this, 'scope.scope_id');
return this?.scope?.scope_id;
}
set scopeID(id) {
if (!this.scope) this.scope = {};
+1 -1
View File
@@ -23,7 +23,7 @@ export default class GroupModel extends GeneratedGroupModel {
* @type {[UserModel]}
*/
// TODO: Use fragments array to read cross scope members.
@computed('member_ids.[]')
@computed('member_ids.[]', 'store')
get members() {
return this.member_ids
.map((id) => this.store.peekRecord('user', id))
+1 -1
View File
@@ -26,7 +26,7 @@ export default class TargetModel extends GeneratedTargetModel {
* instances). Unresolvable instances are excluded from the array.
* @type {[{model: HostSetModel, hostCatalog: HostCatalogModel}]}
*/
@computed('host_sets.[]')
@computed('host_sets.[]', 'store')
get hostSets() {
return this.host_sets
.map(({ host_set_id, host_catalog_id }) => ({