From 742ddee1f131e6a2d701f2eeeb2851e8e1020cb2 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 15 Nov 2018 10:07:44 +0100 Subject: Fix server redundancy tests --- server/models/redundancy/video-redundancy.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'server/models/redundancy/video-redundancy.ts') diff --git a/server/models/redundancy/video-redundancy.ts b/server/models/redundancy/video-redundancy.ts index cbfc7f7fa..35e0cd3b1 100644 --- a/server/models/redundancy/video-redundancy.ts +++ b/server/models/redundancy/video-redundancy.ts @@ -293,6 +293,11 @@ export class VideoRedundancyModel extends Model { } return VideoFileModel.sum('size', options as any) // FIXME: typings + .then(v => { + if (!v || isNaN(v)) return 0 + + return v + }) } static async listLocalExpired () { -- cgit v1.2.3