From 351298b83b9dce14cc74de28a6030881e8944110 Mon Sep 17 00:00:00 2001 From: baogechen Date: Wed, 25 Mar 2015 12:11:25 +0800 Subject: [PATCH] Add parent call in user.format to fix dateTime closes #5066 - fix a problem that user model will fail to save if mysql has option of STRICT_TRANS_TABLES - add a parent call in user.format override function, which should fix dateTime format before user saved. --- core/server/models/user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/server/models/user.js b/core/server/models/user.js index c0c72b45ef..656168222e 100644 --- a/core/server/models/user.js +++ b/core/server/models/user.js @@ -110,7 +110,7 @@ User = ghostBookshelf.Model.extend({ protocols: ['http', 'https']})) { options.website = 'http://' + options.website; } - return options; + return ghostBookshelf.Model.prototype.format.call(this, options); }, posts: function () {