aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/video')
-rw-r--r--server/models/video/video.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/models/video/video.ts b/server/models/video/video.ts
index 86800fb88..b00081f25 100644
--- a/server/models/video/video.ts
+++ b/server/models/video/video.ts
@@ -329,7 +329,7 @@ function associate (models) {
329 onDelete: 'cascade' 329 onDelete: 'cascade'
330 }) 330 })
331 331
332 Video.belongsTo(models.VideoChannel, { 332 Video.belongsTo(models.Video, {
333 foreignKey: { 333 foreignKey: {
334 name: 'parentId', 334 name: 'parentId',
335 allowNull: true 335 allowNull: true
@@ -825,9 +825,11 @@ listForApi = function (start: number, count: number, sort: string) {
825 include: [ 825 include: [
826 { 826 {
827 model: Video['sequelize'].models.VideoChannel, 827 model: Video['sequelize'].models.VideoChannel,
828 required: true,
828 include: [ 829 include: [
829 { 830 {
830 model: Video['sequelize'].models.Account, 831 model: Video['sequelize'].models.Account,
832 required: true,
831 include: [ 833 include: [
832 { 834 {
833 model: Video['sequelize'].models.Server, 835 model: Video['sequelize'].models.Server,