Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Commit

Permalink
Fixed invite resend
Browse files Browse the repository at this point in the history
refs af4bd52

- `record.belongsTo().id` is an older Ember Data concept so it was returning `undefined`
- the `role` relationship is set up as `async: false` and is always output as an embedded record by our API so we're safe to use `this.role.id` without dealing with any async lookup
  • Loading branch information
kevinansfield committed Jan 7, 2020
1 parent af4bd52 commit cc0aa73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/invite.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default Model.extend({
resend() {
let inviteData = {
email: this.email,
role_id: this.belongsTo('role').id
role_id: this.role.id
};

let inviteUrl = this.get('ghostPaths.url').api('invites');
Expand Down

0 comments on commit cc0aa73

Please sign in to comment.