From 1bf7f9507cc87d6319427878da97a12f522967b9 Mon Sep 17 00:00:00 2001 From: Anon Ray Date: Mon, 7 Oct 2013 16:22:40 +0530 Subject: [PATCH] Fix to update already nested data A previous commit fixes the issue with nested data. This commit changes client code to look for nested, with already exisiting users, and fix it while saving/updating. --- mouchak/static/js/editor.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mouchak/static/js/editor.js b/mouchak/static/js/editor.js index 51ee991..7e5c46a 100644 --- a/mouchak/static/js/editor.js +++ b/mouchak/static/js/editor.js @@ -254,7 +254,13 @@ this.model.set({'showNav': false}); } - //console.log('mode before save', this.model.toJSON()); + //code to remove nested page and status fields..a previous commit should + //fix the issue. the following code is for update data older than the + //commit. This should update old nested. Can remove after sometime? + if(this.model.get('page') || this.model.get('status')) { + this.model.unset('page'); + this.model.unset('status'); + } this.model.save({}, { success: function(model, response) { -- 1.7.10.4