Ecto.StaleEntryError on update
1 answer
It looks like you are pulling the schema from the database and updating it after it has been updated somewhere else in your application. Do you choose, hang on to it and update later? If so, select, change and update.
To the right of the Ecto docs:
When a conflict happens (a record which has been previously fetched is
being updated, but that same record has been modified since it was
fetched), an `Ecto.StaleEntryError` exception is raised.
+4
source to share