aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/redundancy/video-redundancy.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-08-13 10:22:54 +0200
committerChocobozzz <me@florianbigard.com>2019-08-13 10:22:54 +0200
commit9e3e3617dcea3e31dea60c4d41c9927da98cd560 (patch)
treee4a3234f99383f3198382c58cb595c031f463a04 /server/models/redundancy/video-redundancy.ts
parentfb1b0ed9f709ef519d0f52bcb2048c10a8c8cfc0 (diff)
downloadPeerTube-9e3e3617dcea3e31dea60c4d41c9927da98cd560.tar.gz
PeerTube-9e3e3617dcea3e31dea60c4d41c9927da98cd560.tar.zst
PeerTube-9e3e3617dcea3e31dea60c4d41c9927da98cd560.zip
Fix redundancy tests
Diffstat (limited to 'server/models/redundancy/video-redundancy.ts')
-rw-r--r--server/models/redundancy/video-redundancy.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/models/redundancy/video-redundancy.ts b/server/models/redundancy/video-redundancy.ts
index 8621a5c6c..3df1c4f9c 100644
--- a/server/models/redundancy/video-redundancy.ts
+++ b/server/models/redundancy/video-redundancy.ts
@@ -237,6 +237,8 @@ export class VideoRedundancyModel extends Model<VideoRedundancyModel> {
237 237
238 static async getVideoSample (p: Bluebird<VideoModel[]>) { 238 static async getVideoSample (p: Bluebird<VideoModel[]>) {
239 const rows = await p 239 const rows = await p
240 if (rows.length === 0) return undefined
241
240 const ids = rows.map(r => r.id) 242 const ids = rows.map(r => r.id)
241 const id = sample(ids) 243 const id = sample(ids)
242 244
@@ -347,6 +349,7 @@ export class VideoRedundancyModel extends Model<VideoRedundancyModel> {
347 required: true, 349 required: true,
348 include: [ 350 include: [
349 { 351 {
352 required: true,
350 attributes: [], 353 attributes: [],
351 model: VideoStreamingPlaylistModel.unscoped(), 354 model: VideoStreamingPlaylistModel.unscoped(),
352 include: [ 355 include: [