From c46d04f6120302e1e73edb473f04b4108328672d Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Tue, 7 Jan 2020 13:45:06 +0000 Subject: [PATCH] Fixed invite resend refs https://github.com/TryGhost/Ghost-Admin/commit/3d7e593c96993289d67d55a4b3152235715dcd2a - `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 --- ghost/admin/app/models/invite.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghost/admin/app/models/invite.js b/ghost/admin/app/models/invite.js index fc2bbf65c4..1bd3e50c74 100644 --- a/ghost/admin/app/models/invite.js +++ b/ghost/admin/app/models/invite.js @@ -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');