aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-01-12 09:47:21 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-01-12 09:47:21 +0100
commit7f4e7c36373217b8e92cf227c71999a0ce9a15d9 (patch)
tree7c7f49d8066646a593c1d8a8551610dbed0f68aa /server/models
parent63d00f5ded0aad25eeb50111da65b6daa46bcb24 (diff)
downloadPeerTube-7f4e7c36373217b8e92cf227c71999a0ce9a15d9.tar.gz
PeerTube-7f4e7c36373217b8e92cf227c71999a0ce9a15d9.tar.zst
PeerTube-7f4e7c36373217b8e92cf227c71999a0ce9a15d9.zip
Server: fix update remote video infohash
Diffstat (limited to 'server/models')
-rw-r--r--server/models/video.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/models/video.js b/server/models/video.js
index b3060705d..ceed976b0 100644
--- a/server/models/video.js
+++ b/server/models/video.js
@@ -141,7 +141,8 @@ module.exports = function (sequelize, DataTypes) {
141} 141}
142 142
143function beforeValidate (video, options, next) { 143function beforeValidate (video, options, next) {
144 if (video.isOwned()) { 144 // Put a fake infoHash if it does not exists yet
145 if (video.isOwned() && !video.infoHash) {
145 // 40 hexa length 146 // 40 hexa length
146 video.infoHash = '0123456789abcdef0123456789abcdef01234567' 147 video.infoHash = '0123456789abcdef0123456789abcdef01234567'
147 } 148 }