From 9ceb4a6ab4fe44d3d3ae5f4a75e3c7be2418ee47 Mon Sep 17 00:00:00 2001 From: Sebastian Gierlinger Date: Sun, 6 Apr 2014 17:46:04 +0200 Subject: [PATCH] Remove second PUT request on image save closes #2557 - replaced model.save() with model.set() --- core/client/views/settings.js | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/core/client/views/settings.js b/core/client/views/settings.js index db22ca3d2a..017a3944dc 100644 --- a/core/client/views/settings.js +++ b/core/client/views/settings.js @@ -220,14 +220,8 @@ } else { data[key] = this.$('.js-upload-target').attr('src'); } - - self.model.save(data, { - success: self.saveSuccess, - error: self.saveError - }).then(function () { - self.saveSettings(); - }); - + self.model.set(data); + self.saveSettings(); return true; }, buttonClass: "button-save right", @@ -298,12 +292,8 @@ } else { data[key] = this.$('.js-upload-target').attr('src'); } - self.model.save(data, { - success: self.saveSuccess, - error: self.saveError - }).then(function () { - self.saveUser(); - }); + self.model.set(data); + self.saveUser(data); return true; }, buttonClass: "button-save right",