From b53d1b68b85e329b56ffe1d26738beee45bda31a Mon Sep 17 00:00:00 2001 From: Jeremy Mitchell Date: Thu, 9 Jan 2020 12:14:22 -0700 Subject: [PATCH] ensures that the view state is not reloaded until the update is complete (#4273) (cherry picked from commit a9914ee0a0589cfaa8f940b4d3a0b485819f8b83) --- .../edit/FormEditDeliveryServiceController.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/traffic_portal/app/src/common/modules/form/deliveryService/edit/FormEditDeliveryServiceController.js b/traffic_portal/app/src/common/modules/form/deliveryService/edit/FormEditDeliveryServiceController.js index 98f4f8a26a..40bf5600d9 100644 --- a/traffic_portal/app/src/common/modules/form/deliveryService/edit/FormEditDeliveryServiceController.js +++ b/traffic_portal/app/src/common/modules/form/deliveryService/edit/FormEditDeliveryServiceController.js @@ -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);