diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/couchdb/couch_db.erl | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/couchdb/couch_db.erl b/src/couchdb/couch_db.erl index 4e64846c..aff5b743 100644 --- a/src/couchdb/couch_db.erl +++ b/src/couchdb/couch_db.erl @@ -316,13 +316,7 @@ prep_and_validate_update(Db, #doc{id=Id,revs={RevStart, Revs}}=Doc, [] -> % new doc, and we have existing revs. % reuse existing deleted doc - if OldFullDocInfo#full_doc_info.deleted -> - % existing docs are deletions - #doc_info{revs=[#rev_info{rev={Pos, DelRevId}}|_]} = - couch_doc:to_doc_info(OldFullDocInfo), - Doc2 = Doc#doc{revs={Pos, [DelRevId]}}, - {validate_doc_update(Db, Doc2, fun() -> nil end), Doc2}; - AllowConflict -> + if OldFullDocInfo#full_doc_info.deleted orelse AllowConflict -> {validate_doc_update(Db, Doc, fun() -> nil end), Doc}; true -> {conflict, Doc} |