We were hitting issues in prod where users could not upload files. The server was throwing :conflicts, but failing to render the modal. Plus nobody else had edited the object in the background.
This appeared to be a combination of:
The default lock_version for these tables in the db is NULL. Which rails casts to 0 - but for some reason this was tripping/failing the constraint rails uses when incrementing the column.
Saving a nested form object (such as images/audio) without changing anything on the parent Podcast/Feed/Episode.
Setting a default of 0 in the migration seems to resolve the issue for me. That's the only change I've made to #1006.
Redoing #1006.
We were hitting issues in prod where users could not upload files. The server was throwing
:conflict
s, but failing to render the modal. Plus nobody else had edited the object in the background.This appeared to be a combination of:
lock_version
for these tables in the db isNULL
. Which rails casts to0
- but for some reason this was tripping/failing the constraint rails uses when incrementing the column.Setting a default of
0
in the migration seems to resolve the issue for me. That's the only change I've made to #1006.