I put the delete in the wrong line, moved down..

This commit is contained in:
Mike P 2012-08-18 12:42:43 -03:00
parent 3ca47526e5
commit 94fb10d560
1 changed files with 3 additions and 2 deletions

View File

@ -200,9 +200,10 @@ Neo4j.prototype.updateIndexes = function updateIndexes(model, node, cb) {
Neo4j.prototype.save = function save(model, data, callback) {
var self = this;
//delete id property since that's redundant and we use the node.id
delete data.id;
this.node(data.id, function (err, node) {
//delete id property since that's redundant and we use the node.id
delete data.id;
if (err) return callback(err);
node.data = cleanup(data);
node.save(function (err) {