From e1a540b5fa14b0fafa63f99e344927b10fdbee00 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 23 May 2018 09:05:53 +0200 Subject: Fix insane SQL request when loading all video attributes --- server/models/video/video.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'server/models') diff --git a/server/models/video/video.ts b/server/models/video/video.ts index fe8c30655..967a899f5 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts @@ -271,6 +271,7 @@ enum ScopeNames { [ScopeNames.WITH_SHARES]: { include: [ { + ['separate' as any]: true, model: () => VideoShareModel.unscoped() } ] @@ -278,6 +279,7 @@ enum ScopeNames { [ScopeNames.WITH_RATES]: { include: [ { + ['separate' as any]: true, model: () => AccountVideoRateModel, include: [ { @@ -297,6 +299,7 @@ enum ScopeNames { [ScopeNames.WITH_COMMENTS]: { include: [ { + ['separate' as any]: true, model: () => VideoCommentModel.unscoped() } ] -- cgit v1.2.3