diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-09-17 15:49:41 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-09-17 15:49:41 +0200 |
commit | cef9a501246398e799154c75f5b92933c955d76c (patch) | |
tree | 554a360781cdd13c63d769fe80c472e016dfbf4e /pyload/web | |
parent | more fixes for py2.5 (diff) | |
download | pyload-cef9a501246398e799154c75f5b92933c955d76c.tar.xz |
account deletion fix
Diffstat (limited to 'pyload/web')
-rw-r--r-- | pyload/web/app/scripts/models/Account.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/pyload/web/app/scripts/models/Account.js b/pyload/web/app/scripts/models/Account.js index dc453ef3c..26241d8e3 100644 --- a/pyload/web/app/scripts/models/Account.js +++ b/pyload/web/app/scripts/models/Account.js @@ -28,6 +28,14 @@ define(['jquery', 'backbone', 'underscore', 'app', 'utils/apitypes', './ConfigIt }, + // representation handled by server + toServerJSON: function() { + var data = this.toJSON(); + delete data.config; + + return data; + }, + parse: function(resp) { // Convert config to models resp.config = _.map(resp.config, function(item) { @@ -78,7 +86,7 @@ define(['jquery', 'backbone', 'underscore', 'app', 'utils/apitypes', './ConfigIt }, destroy: function(options) { - options = App.apiRequest('removeAccount', {account: this.toJSON()}, options); + options = App.apiRequest('removeAccount', {account: this.toServerJSON()}, options); var self = this; options.success = function() { self.trigger('destroy', self, self.collection, options); |