Permalink
Browse files

update should always chech Rev

  • Loading branch information...
1 parent e94a9fc commit b9db1ad4f34c00bea1e1bff781ba2644ea5e7d05 @wactbprot committed Oct 30, 2013
Showing with 4 additions and 5 deletions.
  1. +4 −5 R4CouchDB/R/cdbUpdateDoc.R
@@ -36,11 +36,10 @@ cdbUpdateDoc <- function( cdb){
fname <- deparse(match.call()[[1]])
cdb <- cdb$checkCdb(cdb,fname)
- if(length(cdb$dataList[["_rev"]]) < 1){
- rev <- cdb$getDocRev(cdb)
- if(!is.na(rev)){
- cdb$dataList[["_rev"]] <- rev
- }
+
+ rev <- cdb$getDocRev(cdb)
+ if(!is.na(rev)){
+ cdb$dataList[["_rev"]] <- rev
}
if(cdb$error == ""){

0 comments on commit b9db1ad

Please sign in to comment.