]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/video/video.ts
Fix my videos counter
[github/Chocobozzz/PeerTube.git] / server / models / video / video.ts
index 53328d31178eaa195492060337e9422a95c0f436..55da5305838866a8316f2c39035d4967a90bde4c 100644 (file)
@@ -1005,7 +1005,9 @@ export class VideoModel extends Model<Partial<AttributesOnly<VideoModel>>> {
         order: getVideoSort(sort),
         include: [
           {
-            model: VideoChannelModel,
+            model: forCount
+              ? VideoChannelModel.unscoped()
+              : VideoChannelModel,
             required: true,
             where: channelWhere,
             include: [