From de8826208a35914d94671ac97b347aecaaec48c7 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Tue, 19 Jun 2018 11:27:43 -0400 Subject: [PATCH] LP1739284 Bib summary fetches classification scheme Always fetch the classification scheme org setting (or access the cached value) instead of relying on the value getting stored in advance in egEnv. Signed-off-by: Bill Erickson Signed-off-by: Jason Stephenson --- .../web/js/ui/default/staff/cat/services/record.js | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/Open-ILS/web/js/ui/default/staff/cat/services/record.js b/Open-ILS/web/js/ui/default/staff/cat/services/record.js index 7aa25e13c2..a0d1755b26 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/services/record.js +++ b/Open-ILS/web/js/ui/default/staff/cat/services/record.js @@ -166,14 +166,18 @@ angular.module('egCoreMod') $scope.bib_cn = null; $scope.bib_cn_tooltip = ''; var label_class = 1; - if (egCore.env.aous) - label_class = egCore.env.aous['cat.default_classification_scheme'] || 1; - egCore.net.request( - 'open-ils.cat', - 'open-ils.cat.biblio.record.marc_cn.retrieve', - $scope.recordId, - label_class - ).then(function(cn_array) { + egCore.org.settings(['cat.default_classification_scheme']) + .then(function(s) { + var scheme = s['cat.default_classification_scheme']; + label_class = scheme || 1; + + return egCore.net.request( + 'open-ils.cat', + 'open-ils.cat.biblio.record.marc_cn.retrieve', + $scope.recordId, + label_class + ) + }).then(function(cn_array) { var tooltip = ''; if (cn_array.length > 0) { for (var field in cn_array[0]) { -- 2.11.0