There has been a couple weird behaviours pop up where the list service attempts to insert a work that doesn't exist. I suspect this is due to a race condition where the work is getting deleted in between the service fetching the id and inserting into the work_list_item table.
To properly fix this, we should adjust our repository architecture to support database transactions. As an interim solution, on the frontend we will avoid removing from and adding to a different list at the same time.
There has been a couple weird behaviours pop up where the list service attempts to insert a work that doesn't exist. I suspect this is due to a race condition where the work is getting deleted in between the service fetching the id and inserting into the work_list_item table.
To properly fix this, we should adjust our repository architecture to support database transactions. As an interim solution, on the frontend we will avoid removing from and adding to a different list at the same time.