Skip to content

Commit

Permalink
fix(core): avoid in sync race condition when saving pipelines (#6235)
Browse files Browse the repository at this point in the history
  • Loading branch information
anotherchrisberry authored Jan 2, 2019
1 parent d29b359 commit 6b7c1ec
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -390,11 +390,12 @@ module.exports = angular

this.savePipeline = () => {
this.setViewState({ saving: true });
PipelineConfigService.savePipeline($scope.pipeline)
const toSave = _.cloneDeep($scope.pipeline);
PipelineConfigService.savePipeline(toSave)
.then(() => $scope.application.pipelineConfigs.refresh(true))
.then(
() => {
setOriginal($scope.pipeline);
setOriginal(toSave);
markDirty();
this.setViewState({ saving: false });
},
Expand Down

0 comments on commit 6b7c1ec

Please sign in to comment.