X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmodels%2Fvideo%2Fvideo.ts;h=55da5305838866a8316f2c39035d4967a90bde4c;hb=58c44687f748a3ea5feafe6335fe962aea8186bd;hp=53328d31178eaa195492060337e9422a95c0f436;hpb=1efad362ef0b65118d1d79d802ffc928994c0ef6;p=github%2FChocobozzz%2FPeerTube.git 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: [