From fc25827212daab2e6d3b36b81afec3c3dca36eeb Mon Sep 17 00:00:00 2001 From: Cesar Velez Date: Thu, 26 Jul 2018 17:39:36 -0400 Subject: [PATCH] LP#1642036 - Prevent race condition in Group Member Grid A timing condition was causing the setQuery() fnc to not exist when called resulting in a blank group members grid. A simple $timeout seems to address it. Signed-off by: Cesar Velez --- Open-ILS/web/js/ui/default/staff/circ/patron/app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/app.js b/Open-ILS/web/js/ui/default/staff/circ/patron/app.js index a6131dedc7..24aa858f49 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/patron/app.js +++ b/Open-ILS/web/js/ui/default/staff/circ/patron/app.js @@ -1077,10 +1077,10 @@ function($scope, $routeParams , $q , $window , $timeout, $location , egCore , if (redirect) return; // let initTab() fetch the user first so we can know the usrgroup - grid.setQuery({ + $timeout(grid.setQuery({ usrgroup : patronSvc.current.usrgroup(), deleted : 'f' - }); + }), 500); // wrap in timeout to try to prevent race condition LP1642036 $scope.totals.owed = patronSvc.patron_stats.fines.group_balance_owed; }); -- 2.11.0