Skip to content

Commit

Permalink
Merge pull request #2481 from Johnetordoff/IA-fixes
Browse files Browse the repository at this point in the history
IAC CR Fixes
  • Loading branch information
Johnetordoff authored Jan 17, 2025
2 parents 56c156b + 2da6676 commit c26aa4f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 0 additions & 2 deletions app/adapters/user-message.ts
Original file line number Diff line number Diff line change
@@ -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/`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
3 changes: 2 additions & 1 deletion app/models/user-message.ts
Original file line number Diff line number Diff line change
@@ -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',
Expand All @@ -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> & InstitutionModel;
}

0 comments on commit c26aa4f

Please sign in to comment.