Fix SYSTEM_WITHHELD comments missing in all queue and user detail

This commit is contained in:
Chi Vinh Le
2017-09-19 23:52:25 +07:00
parent ae430245ec
commit e046a9652d
2 changed files with 8 additions and 7 deletions
@@ -28,7 +28,6 @@ export default {
name: t('modqueue.rejected'),
},
all: {
statuses: ['NONE', 'PREMOD', 'ACCEPTED', 'REJECTED'],
icon: 'question_answer',
name: t('modqueue.all'),
},
+8 -6
View File
@@ -281,12 +281,14 @@ const getCommentsByQuery = async (ctx, {ids, statuses, asset_id, parent_id, auth
// Only administrators can search for comments with statuses that are not
// `null`, or `'ACCEPTED'`.
if (ctx.user != null && ctx.user.can(SEARCH_NON_NULL_OR_ACCEPTED_COMMENTS) && statuses && statuses.length > 0) {
comments = comments.where({
status: {
$in: statuses
}
});
if (ctx.user != null && ctx.user.can(SEARCH_NON_NULL_OR_ACCEPTED_COMMENTS)) {
if (statuses && statuses.length > 0) {
comments = comments.where({
status: {
$in: statuses
}
});
}
} else {
comments = comments.where({
status: {