Skip to content

Commit aa55704

Browse files
authored
Merge pull request #5 from leondmello/master
Only request a destroy if the record isn't new
2 parents cfb178d + 569e1e7 commit aa55704

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

addon/mixins/nested-relations.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const attributesFor = function(record) {
4747
attrs = { _delete: true };
4848
}
4949

50-
if (record.get('markedForDestruction')) {
50+
if (!record.get('isNew') && record.get('markedForDestruction')) {
5151
attrs = { _destroy: true };
5252
}
5353

0 commit comments

Comments
 (0)