I put the delete in the wrong line, moved down..
This commit is contained in:
parent
3ca47526e5
commit
94fb10d560
|
@ -200,9 +200,10 @@ Neo4j.prototype.updateIndexes = function updateIndexes(model, node, cb) {
|
||||||
|
|
||||||
Neo4j.prototype.save = function save(model, data, callback) {
|
Neo4j.prototype.save = function save(model, data, callback) {
|
||||||
var self = this;
|
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) {
|
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);
|
if (err) return callback(err);
|
||||||
node.data = cleanup(data);
|
node.data = cleanup(data);
|
||||||
node.save(function (err) {
|
node.save(function (err) {
|
||||||
|
|
Loading…
Reference in New Issue