remove nonbreaking spaces and trim spaces from org unit name user/rogan/lp1722827_kill_non_breaking_spaces_in_located_uris
authorRogan Hamby <rogan.hamby@gmail.com>
Tue, 28 Aug 2018 18:14:52 +0000 (14:14 -0400)
committerRogan Hamby <rogan.hamby@gmail.com>
Tue, 28 Aug 2018 18:14:52 +0000 (14:14 -0400)
Open-ILS/src/sql/Pg/030.schema.metabib.sql

index bc72c89..b6f6fc2 100644 (file)
@@ -1470,7 +1470,7 @@ BEGIN
                 FOR j IN 1 .. ARRAY_UPPER(uri_owner_list, 1) LOOP
                     uri_owner := uri_owner_list[j];
 
-                    SELECT id INTO uri_owner_id FROM actor.org_unit WHERE shortname = uri_owner;
+                    SELECT id INTO uri_owner_id FROM actor.org_unit WHERE shortname = BTRIM(REPLACE(uri_owner,chr(160),''));
                     CONTINUE WHEN NOT FOUND;
 
                     -- we need a call number to link through