If I remove the users relationship from the model, the action works perfectly every time, but with it in I always am getting the error. Anyone able to point me in the right direction here?
I think I actually figured it out. My custom data adapter’s delete function was returning a json object. As soon I set it to return an empty string the issue went away.
This resolved it for me as well. When I modified my api endpoint to return nothing rather than a json object it worked without error. That will get me by now, but it seems like something deeper is wrong here.
I am experiencing the same issue. I am relatively new to Ember, I am using the ember-indexeddb-adapter and am unsure of where to make the return change in the deleteRecord. My addition in the adapter right now allows the item to be deleted, but the error still occurs.
Would someone be willing to teach/show a newbie how to go making a change to prevent the assertion failure? I created an issue in the Github repo but would like to give more information on a fix for the issue.
It somehow never occurred to me that the problem could be in the back-end rather than in the front-end…
For those struggling with what to do: You need to modify the response that the server is giving you when a DELETE is processed for the specific resource. How to do this highly depends on what technology you are using on the server-end. It could virtually be anything.
In my case I use NodeJS and Express so I would basically change one line from:
res.json(200, {my_model: removed_document}); to res.json(200, {});