SOL-1188 fix

This commit is contained in:
asadiqbal
2015-09-21 17:08:27 +05:00
parent 58488eaa0b
commit 3a2c97a02f
2 changed files with 4 additions and 1 deletions

View File

@@ -62,6 +62,10 @@ function (_, str, Backbone, BackboneRelational, BackboneAssociations, gettext, C
// Remember the current state of this model (enables edit->cancel use cases)
this._originalAttributes = this.parse(this.toJSON());
this.get("signatories").each(function (modelSignatory) {
modelSignatory.setOriginalAttributes();
});
// If no url is defined for the signatories child collection we'll need to create that here as well
if(!this.isNew() && !this.get('signatories').url) {
this.get('signatories').url = this.collection.url + '/' + this.get('id') + '/signatories';

View File

@@ -73,7 +73,6 @@ function ($, _, str, Backbone, gettext, TemplateUtils, ViewUtils, BaseView, Sign
actionableModel.save({}, {
success: function() {
actionableModel.setOriginalAttributes();
self.model.setOriginalAttributes();
dfd.resolve();
self.closeSignatoryEditView();
}.bind(this)