Skip to content

Commit

Permalink
add authorizedResource relationship to ConfiguredComputingAddon
Browse files Browse the repository at this point in the history
  • Loading branch information
adlius committed Dec 9, 2024
1 parent 79c2bb2 commit 1f8395b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/models/configured-computing-addon.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { AsyncBelongsTo, belongsTo } from '@ember-data/model';

import ResourceReferenceModel from 'ember-osf-web/models/resource-reference';
import AuthorizedComputingAccount from './authorized-computing-account';
import ExternalComputingService from './external-computing-service';
import ConfiguredAddonModel from './configured-addon';
Expand All @@ -11,6 +12,9 @@ export default class ConfiguredComputingAddonModel extends ConfiguredAddonModel
@belongsTo('authorized-computing-account')
baseAccount!: AsyncBelongsTo<AuthorizedComputingAccount> & AuthorizedComputingAccount;

@belongsTo('resource-reference', { inverse: 'configuredComputingAddons' })
authorizedResource!: AsyncBelongsTo<ResourceReferenceModel> & ResourceReferenceModel;

get externalServiceId() {
return (this as ConfiguredComputingAddonModel).belongsTo('externalComputingService').id();
}
Expand Down

0 comments on commit 1f8395b

Please sign in to comment.