projects
/
oweals
/
peertube.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7e2b4ec
)
Fix insane SQL request when loading all video attributes
author
Chocobozzz
<me@florianbigard.com>
Wed, 23 May 2018 07:05:53 +0000
(09:05 +0200)
committer
Chocobozzz
<me@florianbigard.com>
Wed, 23 May 2018 07:07:32 +0000
(09:07 +0200)
server/models/video/video.ts
patch
|
blob
|
history
diff --git
a/server/models/video/video.ts
b/server/models/video/video.ts
index fe8c30655a31b1333f0529d0c6329b86ddbbe13f..967a899f50ad8239f2e23f21ef2300b354163372 100644
(file)
--- 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()
}
]