author | Clipperz <info@clipperz.com> | 2013-01-18 15:02:39 (UTC) |
---|---|---|
committer | Clipperz <info@clipperz.com> | 2013-01-18 15:02:39 (UTC) |
commit | 969b9f94a25931a765a4cd4765177979f66c1585 (patch) (side-by-side diff) | |
tree | 0b61de265b28c11260dc15256c30184454e7ef08 | |
parent | fac609cf1507ae82e7069b21724e089a9ac93869 (diff) | |
download | clipperz-969b9f94a25931a765a4cd4765177979f66c1585.zip clipperz-969b9f94a25931a765a4cd4765177979f66c1585.tar.gz clipperz-969b9f94a25931a765a4cd4765177979f66c1585.tar.bz2 |
Fixed error when importing data
-rw-r--r-- | frontend/beta/js/Clipperz/PM/DataModel/User.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/frontend/beta/js/Clipperz/PM/DataModel/User.js b/frontend/beta/js/Clipperz/PM/DataModel/User.js index b065557..b29d224 100644 --- a/frontend/beta/js/Clipperz/PM/DataModel/User.js +++ b/frontend/beta/js/Clipperz/PM/DataModel/User.js @@ -310,7 +310,12 @@ MochiKit.Logging.logDebug("--- User.saveRecords - 1"); MochiKit.Logging.logDebug("--- User.saveRecords - 2"); */ - result = {'records': []}; + result = { + 'records': { +// 'deleted': [], + 'updated': [] + } + }; deferredResult = new MochiKit.Async.Deferred(); c = someRecords.length; @@ -367,7 +372,7 @@ MochiKit.Logging.logDebug("--- User.saveRecords - 2"); //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 6.7 " + res); return res;}); deferredResult.addCallback(function(aResult, res) { - aResult['records'] = { 'updated': [res] }; + aResult['records']['updated'].push(res); return aResult; }, result); //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 6.8 " + res); return res;}); |