mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-29 05:42:32 +03:00
Fixed options not being passed to loaded replies
fixes https://github.com/TryGhost/Team/issues/1787 - Options were not passed - The member context variable was not passed to the count helper - Liked was always false for replies
This commit is contained in:
parent
60cd54dda3
commit
5c75997685
@ -52,8 +52,7 @@ const Comment = ghostBookshelf.Model.extend({
|
||||
|
||||
replies() {
|
||||
return this.hasMany('Comment', 'parent_id', 'id')
|
||||
.query('orderBy', 'id', 'ASC')
|
||||
.query('limit', 3);
|
||||
.query('orderBy', 'created_at', 'ASC');
|
||||
},
|
||||
|
||||
emitChange: function emitChange(event, options) {
|
||||
@ -214,7 +213,7 @@ const Comment = ghostBookshelf.Model.extend({
|
||||
const result = await ghostBookshelf.Model.findPage.call(this, options);
|
||||
|
||||
for (const model of result.data) {
|
||||
await model.load(relationsToLoadIndividually);
|
||||
await model.load(relationsToLoadIndividually, _.omit(options, 'withRelated'));
|
||||
}
|
||||
|
||||
return result;
|
||||
|
Loading…
Reference in New Issue
Block a user