From: Galen Charlton Date: Mon, 1 Feb 2016 16:43:09 +0000 (-0500) Subject: webstaff: clean up console noise X-Git-Tag: sprint4-merge-nov22~679 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=f0a5c2c4391b763fb2bd9366deda29d815ff99d7;p=working%2FEvergreen.git webstaff: clean up console noise Ensure that if a default stat cat OU filter is not set, that errors aren't logged when creating a new volume/copy. Signed-off-by: Galen Charlton Signed-off-by: Kathy Lussier --- diff --git a/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js b/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js index cef2bf3617..ce8f29cad4 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js +++ b/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js @@ -751,7 +751,10 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore , $scope.batch.prefix = $scope.defaults.prefix; $scope.batch.suffix = $scope.defaults.suffix; $scope.working.statcat_filter = $scope.defaults.statcat_filter; - if (typeof $scope.defaults.statcat_filter == 'object') { + if ( + typeof $scope.defaults.statcat_filter == 'object' && + Object.keys($scope.defaults.statcat_filter).length > 0 + ) { // want fieldmapper object here... $scope.defaults.statcat_filter = egCore.idl.Clone($scope.defaults.statcat_filter); @@ -1559,7 +1562,10 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore , if (t) { $scope.defaults = t; $scope.working.statcat_filter = $scope.defaults.statcat_filter; - if (typeof $scope.defaults.statcat_filter == 'object') { + if ( + typeof $scope.defaults.statcat_filter == 'object' && + Object.keys($scope.defaults.statcat_filter).length > 0 + ) { // want fieldmapper object here... $scope.defaults.statcat_filter = egCore.idl.Clone($scope.defaults.statcat_filter);