aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-11-15 16:28:35 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-11-27 19:40:52 +0100
commit8e10cf1a5a438a00e5f7e0691cb830769867cffc (patch)
tree23c0aeb43d7fb05b2d280c37b4334c2f320b647e /server/models/video
parent8e13fa7d09e9925b4559cbba6c5d72c5ff1bd391 (diff)
downloadPeerTube-8e10cf1a5a438a00e5f7e0691cb830769867cffc.tar.gz
PeerTube-8e10cf1a5a438a00e5f7e0691cb830769867cffc.tar.zst
PeerTube-8e10cf1a5a438a00e5f7e0691cb830769867cffc.zip
Fix video upload and videos list
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,