Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IAC CR Fixes #2481

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
}
Loading