From fc2240733a455a7c4e1a6866e3a0d0d77c7025de Mon Sep 17 00:00:00 2001 From: Mark Cooper Date: Fri, 12 Oct 2012 15:18:22 -0700 Subject: [PATCH] LP#849008: Delete button in Admin > Server Settings > Z39.50 Servers doesn't work Fix to account for a Z server without attributes being deleted. Signed-off-by: Mark Cooper --- Open-ILS/web/js/ui/default/conify/global/config/z3950_source.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Open-ILS/web/js/ui/default/conify/global/config/z3950_source.js b/Open-ILS/web/js/ui/default/conify/global/config/z3950_source.js index 8c7c199f6d..536570990e 100644 --- a/Open-ILS/web/js/ui/default/conify/global/config/z3950_source.js +++ b/Open-ILS/web/js/ui/default/conify/global/config/z3950_source.js @@ -84,7 +84,9 @@ function deleteAttributesThenSources() { var source_code = zsrc['name']; // retrieve attributes var sourceAttrs = pcrud.search('cza', {source : source_code}); - pcrud.eliminate(sourceAttrs); + if(sourceAttrs.length > 0) { + pcrud.eliminate(sourceAttrs); + } } ); //now attributes are gone it's ok to delete -- 2.11.0