aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/video')
-rw-r--r--server/models/video/video.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/server/models/video/video.ts b/server/models/video/video.ts
index 199ea9ea4..3f282580c 100644
--- a/server/models/video/video.ts
+++ b/server/models/video/video.ts
@@ -425,6 +425,11 @@ type AvailableForListIDsOptions = {
425 userId: options.historyOfUser.id 425 userId: options.historyOfUser.id
426 } 426 }
427 }) 427 })
428
429 // Even if the relation is n:m, we know that a user only have 0..1 video history
430 // So we won't have multiple rows for the same video
431 // Without this, we would not be able to sort on "updatedAt" column of UserVideoHistoryModel
432 query.subQuery = false
428 } 433 }
429 434
430 return query 435 return query