aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/redundancy
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-11-15 10:07:44 +0100
committerChocobozzz <me@florianbigard.com>2018-11-15 10:15:34 +0100
commit742ddee1f131e6a2d701f2eeeb2851e8e1020cb2 (patch)
treee6ec6b7a9af76c3d20091436d8c648983bf63870 /server/models/redundancy
parent2fbe7f1933f4bd5de96e6428234e56965616120e (diff)
downloadPeerTube-742ddee1f131e6a2d701f2eeeb2851e8e1020cb2.tar.gz
PeerTube-742ddee1f131e6a2d701f2eeeb2851e8e1020cb2.tar.zst
PeerTube-742ddee1f131e6a2d701f2eeeb2851e8e1020cb2.zip
Fix server redundancy tests
Diffstat (limited to 'server/models/redundancy')
-rw-r--r--server/models/redundancy/video-redundancy.ts5
1 files changed, 5 insertions, 0 deletions
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<VideoRedundancyModel> {
293 } 293 }
294 294
295 return VideoFileModel.sum('size', options as any) // FIXME: typings 295 return VideoFileModel.sum('size', options as any) // FIXME: typings
296 .then(v => {
297 if (!v || isNaN(v)) return 0
298
299 return v
300 })
296 } 301 }
297 302
298 static async listLocalExpired () { 303 static async listLocalExpired () {