From 941721d4b0d0de8d8303360019273ecc4c2dc4b9 Mon Sep 17 00:00:00 2001 From: Kyle Huckins Date: Thu, 16 Nov 2017 23:54:48 +0000 Subject: [PATCH] lp1646210 Call Number Affixes Waiting for Copy bugfix -Checks for a volume in hold data, preventing broken grids in cases where a hold is waiting for copy Signed-off-by: Kyle Huckins Changes to be committed: modified: Open-ILS/web/js/ui/default/staff/circ/services/holds.js Signed-off-by: Kathy Lussier --- .../web/js/ui/default/staff/circ/services/holds.js | 18 ++++++++++-------- 1 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Open-ILS/web/js/ui/default/staff/circ/services/holds.js b/Open-ILS/web/js/ui/default/staff/circ/services/holds.js index 8b1d0f4..656e7c4 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/services/holds.js +++ b/Open-ILS/web/js/ui/default/staff/circ/services/holds.js @@ -489,14 +489,16 @@ function($uibModal , $q , egCore , egConfirmDialog , egAlertDialog) { ).then(function(c) { hold.current_copy().status(c) }); } - //Call number affixes are not always fleshed in the API - if (volume.prefix() && typeof volume.prefix() != 'object') { - console.debug('fetching call number prefix'); - egCore.pcrud.retrieve('acnp',volume.prefix()).then(function(p) {volume.prefix(p)}); - } - if (volume.suffix() && typeof volume.suffix() != 'object') { - console.debug('fetching call number prefix'); - egCore.pcrud.retrieve('acns',volume.suffix()).then(function(s) {volume.suffix(s)}); + if (volume) { + //Call number affixes are not always fleshed in the API + if (volume.prefix() && typeof volume.prefix() != 'object') { + console.debug('fetching call number prefix'); + egCore.pcrud.retrieve('acnp',volume.prefix()).then(function(p) {volume.prefix(p)}); + } + if (volume.suffix() && typeof volume.suffix() != 'object') { + console.debug('fetching call number prefix'); + egCore.pcrud.retrieve('acns',volume.suffix()).then(function(s) {volume.suffix(s)}); + } } } -- 1.7.2.5