Skip to content

Commit

Permalink
Merge pull request #2407 from spadgett/edit-env-background-update
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue.

Correctly merge env edits after background upates

Fixes #2394

/kind bug
  • Loading branch information
openshift-merge-robot authored Nov 1, 2017
2 parents 9392873 + acfc8be commit 57ae92d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/scripts/directives/editEnvironmentVariables.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
// variables. If not, merge the environment edits into the updated
// deployment config object.
if (EnvironmentService.isEnvironmentEqual(currentValue, previousValue)) {
ctrl.updatedObject = EnvironmentService.mergeEdits(currentValue, previousValue);
ctrl.updatedObject = EnvironmentService.mergeEdits(ctrl.updatedObject, currentValue);
return;
}

Expand Down
2 changes: 1 addition & 1 deletion dist/scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -14478,7 +14478,7 @@ bottom: n.offsetBottom
angular.module("openshiftConsole").component("editEnvironmentVariables", {
controller: [ "$filter", "APIService", "DataService", "EnvironmentService", "NotificationsService", function(e, t, n, a, r) {
var o, i, s, c, l = this, u = !1, d = [], m = [], p = !1, f = e("canI"), g = e("getErrorDetails"), v = e("humanizeKind"), h = e("orderByDisplayName"), y = function(e, t) {
u || (l.form && !l.form.$pristine && l.updatedObject ? a.isEnvironmentEqual(e, t) ? l.updatedObject = a.mergeEdits(e, t) : (u = !0, r.addNotification({
u || (l.form && !l.form.$pristine && l.updatedObject ? a.isEnvironmentEqual(e, t) ? l.updatedObject = a.mergeEdits(l.updatedObject, e) : (u = !0, r.addNotification({
type: "warning",
message: "The environment variables for the " + o + " have been updated in the background.",
details: "Saving your changes may create a conflict or cause loss of data."
Expand Down

0 comments on commit 57ae92d

Please sign in to comment.