The problem is that we access and update the same document that you want to write.
put_record(r) # mutates r, sets _rev
delete_record(id) # downloads record with that id, updates and sets _rev to new value in DB.
put_record(r) # tries to push with a record revision that is out of date.
The problem is that we access and update the same document that you want to write.
put_record(r) # mutates r, sets _rev
delete_record(id) # downloads record with that id, updates and sets _rev to new value in DB.
put_record(r) # tries to push with a record revision that is out of date.