From 8ae0321d5bad47486ca9ff22a99de451a2900850 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Mon, 5 Oct 2015 18:13:54 -0400 Subject: [PATCH] webstaff: don't break embedded volcopy editor if volume is empty Signed-off-by: Galen Charlton --- Open-ILS/web/js/ui/default/staff/cat/services/holdings.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Open-ILS/web/js/ui/default/staff/cat/services/holdings.js b/Open-ILS/web/js/ui/default/staff/cat/services/holdings.js index 0bebe6cf31..9112eeccf4 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/services/holdings.js +++ b/Open-ILS/web/js/ui/default/staff/cat/services/holdings.js @@ -296,7 +296,13 @@ function(egCore , $q) { var cp_id_list = []; angular.forEach( $scope.holdingsGridControls.allItems(), - function (item) { cp_id_list = cp_id_list.concat(item.id_list) } + function (item) { + if (item.copy_count > 0) { + // TODO: may want to make some provision for editing + // empty volumes + cp_id_list = cp_id_list.concat(item.id_list) + } + } ); return cp_id_list; } -- 2.11.0