[Answer]-Django + tastypie + mongoengine + 500 error on saving model with backbone.js & backbone-tastypie.js

1👍

Well, I find it hard to believe that this is the only way I can get it to work correctly, but currently this is a solution:

 if( this.model.get('has_access') ){
      this.model.save({'has_access' : false}, {patch : true});
 }
 else{
      this.model.save({'has_access' : true}, {patch : true});
 }

By passing {patch : true} with each save, it is only partially updating the model.

I am still waiting for any other solutions or for someone to confirm that my current fix is a correct way to do it.

Leave a comment