this may fix the attachment erase problem on couchview
This commit is contained in:
parent
26d50c8ac1
commit
2082c491fa
|
@ -206,7 +206,7 @@ module CouchRest
|
||||||
existing = @db.get(id) rescue nil
|
existing = @db.get(id) rescue nil
|
||||||
|
|
||||||
if existing
|
if existing
|
||||||
updated = fields.merge({"_id" => id, "_rev" => existing["_rev"]})
|
updated = existing.merge(fields)
|
||||||
if existing != updated
|
if existing != updated
|
||||||
say "replacing #{id}"
|
say "replacing #{id}"
|
||||||
db.save(updated)
|
db.save(updated)
|
||||||
|
|
Loading…
Reference in a new issue