You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After creating a new record with store.createRecord I might need to destroy it if user prefers not to save. If the new record is valid then destroyRecord deletes it (but the record still remains in the store???). But if the record is NOT valid then store is trying to make a DELETE request to the server. The url in this case is wrong, e.g. for a 'user' it makes a call to api/users/ without any id (new record doesn't have an id).
After some debugging I think the problem is here. 'currentState' in case of invalid record would be "root.deleted.inFlight", not 'root.deleted.saved'
The text was updated successfully, but these errors were encountered:
Just saw this behavior in 2.4.3. Call save() on a record. Server responds with 422 error. Then call destroyRecord and a DELETE call is made to api/users, not like api/users/1.
After creating a new record with store.createRecord I might need to destroy it if user prefers not to save. If the new record is valid then destroyRecord deletes it (but the record still remains in the store???). But if the record is NOT valid then store is trying to make a DELETE request to the server. The url in this case is wrong, e.g. for a 'user' it makes a call to api/users/ without any id (new record doesn't have an id).
After some debugging I think the problem is here. 'currentState' in case of invalid record would be "root.deleted.inFlight", not 'root.deleted.saved'
The text was updated successfully, but these errors were encountered: