diff --git a/core/server/models/post.js b/core/server/models/post.js index 9d3d4e9b88..dfb31c7a00 100644 --- a/core/server/models/post.js +++ b/core/server/models/post.js @@ -331,7 +331,9 @@ Post = ghostBookshelf.Model.extend({ }, tags: function tags() { - return this.belongsToMany('Tag').withPivot('sort_order').query('orderBy', 'sort_order', 'ASC'); + return this.belongsToMany('Tag', 'posts_tags', 'post_id', 'tag_id') + .withPivot('sort_order') + .query('orderBy', 'sort_order', 'ASC'); }, fields: function fields() {