diff --git a/lib/cradle/database/documents.js b/lib/cradle/database/documents.js index 3ac8f39..0d88e47 100644 --- a/lib/cradle/database/documents.js +++ b/lib/cradle/database/documents.js @@ -134,18 +134,9 @@ Database.prototype._save = function (id, rev, doc, callback) { } else { // Attempt to create a new document. If it fails, // because an existing document with that _id exists (409), - // perform a HEAD, to get the _rev, and try to re-save. + // don't try to do anything funny in the dark. this.put(id, document, function (e, res) { - if (e && e.headers && e.headers.status === 409) { // Conflict - that.head(id, function (e, headers, res) { - if (res === 404 || !headers['etag']) { - return callback({ reason: 'not_found' }); - } - - document._rev = headers['etag'].slice(1, -1); - that.put(id, document, callback); - }); - } else { callback(e, res) } + callback(e, res); }); } // POST a single document, without an id (Create)