From 84ee919953b3ed9aff1e86816a6c325e031bda02 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Tue, 16 Nov 2021 16:14:17 -0500 Subject: [PATCH] Attempt to fix authority.generate_overlay_template --- Open-ILS/src/sql/Pg/011.schema.authority.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/sql/Pg/011.schema.authority.sql b/Open-ILS/src/sql/Pg/011.schema.authority.sql index 6186b18dc9..fa61fbbfe3 100644 --- a/Open-ILS/src/sql/Pg/011.schema.authority.sql +++ b/Open-ILS/src/sql/Pg/011.schema.authority.sql @@ -610,8 +610,8 @@ BEGIN FOR main_entry IN SELECT * FROM authority.control_set_authority_field acsaf WHERE acsaf.control_set = cset AND acsaf.main_entry IS NULL LOOP auth_field := XPATH('//*[@tag="'||main_entry.tag||'"][1]',source_xml::XML); - auth_i1 = (XPATH('@ind1',auth_field[1]))[1]; - auth_i2 = (XPATH('@ind2',auth_field[1]))[1]; + auth_i1 = (XPATH('//*[@ind1]',auth_field[1]))[1]; + auth_i2 = (XPATH('//*[@ind2]',auth_field[1]))[1]; IF ARRAY_LENGTH(auth_field,1) > 0 THEN FOR bib_field IN SELECT * FROM authority.control_set_bib_field WHERE authority_field = main_entry.id LOOP SELECT XMLELEMENT( -- XMLAGG avoids magical creation, but requires unnest subquery -- 2.11.0