From: Mark Cooper Date: Fri, 12 Oct 2012 22:18:22 +0000 (-0700) Subject: LP#849008: Delete button in Admin > Server Settings > Z39.50 Servers doesn't work X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=refs%2Fheads%2Fuser%2Fmcooper%2Flp849008;p=working%2FEvergreen.git 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 --- 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