vendredi 13 novembre 2015

Ember Data error when deleting model

I have an Ember-cli app (v2.1), and I'm having an issue with Ember Data when deleting a record from my blog model. Here's the code I'm calling for the deletion:

deleteBlog (blog) {
  this.store.findRecord('blog', blog.get('id')).then(blog => {
    blog.destroyRecord();
  });
}

As expected, Ember Data makes the DELETE request, which works perfectly with my express.js backend service.

The only problem is that the record does not get removed from the Ember Data store, and I get the following error message:

Error: Attempted to handle event pushedData on my-app@model:blog::ember529:56455037f9cf29a325ae72b9 while in state root.deleted.inFlight

I appreciate any feedback!




Aucun commentaire:

Enregistrer un commentaire