From ad4a8a1cca1049f600ebcdce9260c1021cd821a5 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Sat, 18 Feb 2017 09:29:59 +0100 Subject: Add email to users --- server/models/author.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'server/models/author.js') diff --git a/server/models/author.js b/server/models/author.js index f036193c8..34b013097 100644 --- a/server/models/author.js +++ b/server/models/author.js @@ -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]) }) } -- cgit v1.2.3