# isDeleted not changed by rollbackAttributes()

**URL:** <https://discuss.emberjs.com/t/isdeleted-not-changed-by-rollbackattributes/14221>\
**Category:** Ember Data\
**Created:** [February 7, 2018, 6:30pm UTC](https://discuss.emberjs.com/t/isdeleted-not-changed-by-rollbackattributes/14221 "2018-02-07T18:30:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![em.b](https://avatars.discourse-cdn.com/v4/letter/e/96bed5/32.png) [@em.b](https://discuss.emberjs.com/u/em.b)\
**Post date:** [February 7, 2018, 6:30pm UTC](https://discuss.emberjs.com/t/isdeleted-not-changed-by-rollbackattributes/14221/1 "2018-02-07T18:30:07Z")

</div>

I need to be able to “undelete” a record after it has been marked for deletion (not persisted yet). The guides indicate that `rollbackAttributes()` is the proper way to do this.

However, the following indicates that `rollbackAttributes()` is not affecting the isDeleted property on the record. I am using Ember 2.15.

`console.log(record.get('hasDirtyAttributes')); // false console.log(record.get('isDeleted')); // false`

`record.deleteRecord();`

`console.log(record.get('isDeleted')); // true console.log(record.get('hasDirtyAttributes')); // false `

`record.rollbackAttributes();`

`console.log(record.get('isDeleted')); // true console.log(record.get('hasDirtyAttributes')); // false `

Is this a bug?
