Skip to content

Commit 0629f45

Browse files
committed
Using "patch" for updates and "post" for inserts.
1 parent 84173d3 commit 0629f45

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

js/view-action/toolbar.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -683,10 +683,10 @@ return Backbone.View.extend({
683683
}
684684
}else{
685685
// TODO fix bug w/ insert when filter applied => dup record
686-
var updateModel = this.getData(true);
687-
this.model.set(updateModel);
688-
this.model.save({}, {
689-
//patch: true,
686+
var updatedModel = this.getData(true);
687+
this.model.set(updatedModel);
688+
this.model.save(this.model.changedAttributes(), {
689+
patch: !this.model.isNew(),
690690
success: function(m){
691691
fnSuccess(m);
692692
that.collection.set(m, {remove:false});

0 commit comments

Comments
 (0)