From 58c44687f748a3ea5feafe6335fe962aea8186bd Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 18 Jul 2022 14:53:50 +0200 Subject: Fix my videos counter --- server/models/video/video.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'server/models') diff --git a/server/models/video/video.ts b/server/models/video/video.ts index 53328d311..55da53058 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts @@ -1005,7 +1005,9 @@ export class VideoModel extends Model>> { order: getVideoSort(sort), include: [ { - model: VideoChannelModel, + model: forCount + ? VideoChannelModel.unscoped() + : VideoChannelModel, required: true, where: channelWhere, include: [ -- cgit v1.2.3