Skip to content

Commit

Permalink
ensures that the view state is not reloaded until the update is compl…
Browse files Browse the repository at this point in the history
…ete (#4273) (#4276)

(cherry picked from commit a9914ee)
  • Loading branch information
mitchell852 authored and rawlinp committed Jan 9, 2020
1 parent b6f52aa commit 76b8131
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,13 @@ var FormEditDeliveryServiceController = function(deliveryService, origin, type,
if (options.status.id == $scope.COMPLETE) {
createDeliveryServiceUpdateRequest(dsRequest, options.comment, true).then(
function() {
deliveryServiceService.updateDeliveryService(deliveryService);
}).then(function() {
$state.reload(); // reloads all the resolves for the view
messageModel.setMessages([ { level: 'success', text: 'Delivery Service [ ' + deliveryService.xmlId + ' ] updated' } ], false);
deliveryServiceService.updateDeliveryService(deliveryService).
then(
function() {
$state.reload(); // reloads all the resolves for the view
messageModel.setMessages([ { level: 'success', text: 'Delivery Service [ ' + deliveryService.xmlId + ' ] updated' } ], false);
}
);
}).catch(function(fault) {
$anchorScroll(); // scrolls window to top
messageModel.setMessages(fault.data.alerts, false);
Expand Down

0 comments on commit 76b8131

Please sign in to comment.