webstaff: fix a thinko when saving default Z39.50 targets
authorGalen Charlton <gmc@esilibrary.com>
Tue, 8 Sep 2015 19:33:00 +0000 (19:33 +0000)
committerJason Stephenson <jstephenson@mvlc.org>
Mon, 14 Sep 2015 19:44:20 +0000 (15:44 -0400)
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Open-ILS/web/js/ui/default/staff/cat/services/z3950.js

index 11b5d94..918de4b 100644 (file)
@@ -131,10 +131,10 @@ function($q,   egCore,   egAuth) {
         angular.forEach(service.targets, function(target, idx) {
             if (target.selected) {
                 saved_targets[target.code] = {};
-            }
-            if (target.settings.auth == 't') {
-                saved_targets[target.code]['username'] = target.username;
-                saved_targets[target.code]['password'] = target.password;
+                if (target.settings.auth == 't') {
+                    saved_targets[target.code]['username'] = target.username;
+                    saved_targets[target.code]['password'] = target.password;
+                }
             }
         }); 
         egCore.hatch.setLocalItem('eg.cat.z3950.default_targets', saved_targets);