diff --git a/app/adapters/user-message.ts b/app/adapters/user-message.ts index dad3feb9ef..60edd8f198 100644 --- a/app/adapters/user-message.ts +++ b/app/adapters/user-message.ts @@ -1,10 +1,8 @@ -import { inject as service } from '@ember/service'; import config from 'ember-osf-web/config/environment'; const { OSF: { apiUrl } } = config; import OsfAdapter from './osf-adapter'; export default class UserMessageAdapter extends OsfAdapter { - @service session; urlForCreateRecord(modelName, snapshot) { const userId = snapshot.record.messageRecipient; return `${apiUrl}/v2/users/${userId}/messages/`; diff --git a/app/institutions/dashboard/-components/object-list/contributors-field/component.ts b/app/institutions/dashboard/-components/object-list/contributors-field/component.ts index 022528b4da..4b5e4925bb 100644 --- a/app/institutions/dashboard/-components/object-list/contributors-field/component.ts +++ b/app/institutions/dashboard/-components/object-list/contributors-field/component.ts @@ -74,7 +74,7 @@ export default class InstitutionalObjectListContributorsField extends Component< function hasInstitutionAffiliation(contributors: any[], attribution: any, institutionIris: string[]) { const attributedContributor = getContributorById(contributors, getSingleOsfmapValue(attribution, ['agent'])); - return true; + if (!attributedContributor.affiliation) { return false; } diff --git a/app/models/user-message.ts b/app/models/user-message.ts index 89e9453756..838afef701 100644 --- a/app/models/user-message.ts +++ b/app/models/user-message.ts @@ -1,5 +1,6 @@ // app/models/user-message.js import Model, { attr, belongsTo } from '@ember-data/model'; +import InstitutionModel from 'ember-osf-web/models/institution'; export enum MessageTypeChoices { InstitutionalRequest = 'institutional_request', @@ -11,5 +12,5 @@ export default class UserMessageModel extends Model { @attr('string') messageType: MessageTypeChoices; @attr('boolean') bccSender; @attr('boolean') replyTo; - @belongsTo('institution') institution; + @belongsTo('institution') institution!: AsyncBelongsTo & InstitutionModel; }