Skip to content
This repository has been archived by the owner on Aug 5, 2021. It is now read-only.

Commit

Permalink
reset changes on create fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Philipp Waldmann committed Jul 17, 2015
1 parent 948a680 commit 3f75904
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/stores/sql/save.js
Expand Up @@ -202,12 +202,13 @@ exports.record = {

self.__exists = true;
self.set(id_tmp, 'read');
self.changes = {};

self.callInterceptors('afterCreate', [self, options.transaction], function(okay){
if(okay){
self.callInterceptors('afterSave', [self, options.transaction], function(okay){
if(okay){
self.changes = {};

if(options.commit !== false){
options.transaction.commit();
options.transaction_promise.then(function(){
Expand Down

0 comments on commit 3f75904

Please sign in to comment.