aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models
diff options
context:
space:
mode:
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 }