]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/author.js
Add email to users
[github/Chocobozzz/PeerTube.git] / server / models / author.js
index f036193c839bb3426c48a73533c75ed56017415c..34b0130971e12db40f7cd4043f2985734d3ba6f5 100644 (file)
@@ -84,7 +84,9 @@ function findOrCreateAuthor (name, podId, userId, transaction, callback) {
   if (transaction) query.transaction = transaction
 
   this.findOrCreate(query).asCallback(function (err, result) {
+    if (err) return callback(err)
+
     // [ instance, wasCreated ]
-    return callback(err, result[0])
+    return callback(null, result[0])
   })
 }