diff --git a/src/views/apps.js b/src/views/apps.js index 651c60364..a059837e1 100644 --- a/src/views/apps.js +++ b/src/views/apps.js @@ -281,10 +281,18 @@ angular.module('Application').controller('AppsController', ['$scope', '$location clone: function () { $scope.appRestore.busy = true; + // only use enabled ports from portBindings + var finalPortBindings = {}; + for (var env in $scope.appRestore.portBindings) { + if ($scope.appRestore.portBindingsEnabled[env]) { + finalPortBindings[env] = $scope.appRestore.portBindings[env]; + } + } + var data = { location: $scope.appRestore.location, domain: $scope.appRestore.domain.domain, - portBindings: $scope.appRestore.portBindings, + portBindings: finalPortBindings, backupId: $scope.appRestore.selectedBackup.id };