apache / couchdb-fauxton

Fauxton is the new Web UI for CouchDB
https://github.com/apache/couchdb-fauxton
Apache License 2.0
382 stars 224 forks source link

Bug: `_rev` field overridden when `rev` field is present #1448

Open feliixx opened 5 months ago

feliixx commented 5 months ago

Hi, thanks for maintaining this great project ! While trying to update an old document with Fauxton recently I noticed a weird behavior:

Expected Behavior

Current Behavior

Steps to Reproduce (for bugs)

  1. Create an empty document, and save it. _rev becomes 1-xxx
  2. Open the doc in Fauxton, and update the document to add the field "rev": "1-xxx"
  3. Save the doc, and open it again in the UI

=> the UI shows the document with the wrong _rev: {"_rev": "1-xxx"} instead of {"_rev": "2-xxx", "rev": "1-xxx"}

Context

Your Environment