diff options
Diffstat (limited to 'server/models/video/video.ts')
-rw-r--r-- | server/models/video/video.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/server/models/video/video.ts b/server/models/video/video.ts index 06c63e87c..7624b0649 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts | |||
@@ -240,7 +240,10 @@ type AvailableForListIDsOptions = { | |||
240 | if (options.videoPlaylistId) { | 240 | if (options.videoPlaylistId) { |
241 | query.include.push({ | 241 | query.include.push({ |
242 | model: VideoPlaylistElementModel.unscoped(), | 242 | model: VideoPlaylistElementModel.unscoped(), |
243 | required: true | 243 | required: true, |
244 | where: { | ||
245 | videoPlaylistId: options.videoPlaylistId | ||
246 | } | ||
244 | }) | 247 | }) |
245 | } | 248 | } |
246 | 249 | ||
@@ -304,6 +307,8 @@ type AvailableForListIDsOptions = { | |||
304 | videoPlaylistId: options.videoPlaylistId | 307 | videoPlaylistId: options.videoPlaylistId |
305 | } | 308 | } |
306 | }) | 309 | }) |
310 | |||
311 | query.subQuery = false | ||
307 | } | 312 | } |
308 | 313 | ||
309 | if (options.filter || options.accountId || options.videoChannelId) { | 314 | if (options.filter || options.accountId || options.videoChannelId) { |