From 9e3e3617dcea3e31dea60c4d41c9927da98cd560 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 13 Aug 2019 10:22:54 +0200 Subject: Fix redundancy tests --- server/models/redundancy/video-redundancy.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'server/models') 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 { static async getVideoSample (p: Bluebird) { const rows = await p + if (rows.length === 0) return undefined + const ids = rows.map(r => r.id) const id = sample(ids) @@ -347,6 +349,7 @@ export class VideoRedundancyModel extends Model { required: true, include: [ { + required: true, attributes: [], model: VideoStreamingPlaylistModel.unscoped(), include: [ -- cgit v1.2.3