From 8379d745fe1074fc10c5d7262ab05d3c5ae0c5c7 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Thu, 27 Apr 2023 17:54:45 +0000 Subject: [PATCH] LP#1997485: (follow-up) fix propagation of settings Ensures if the search suggestions library settings have not been set, that the attempt to copy them over to the search classes will not display error messages. Signed-off-by: Galen Charlton --- Open-ILS/src/sql/Pg/upgrade/XXXX.schema.DYM-multi-word.sql | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.DYM-multi-word.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.DYM-multi-word.sql index 1eba4bf798..aeb4304b88 100644 --- a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.DYM-multi-word.sql +++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.DYM-multi-word.sql @@ -720,7 +720,7 @@ BEGIN JOIN actor.org_unit_type t ON (u.ou_type = t.id) WHERE s.name = 'opac.did_you_mean.low_result_threshold'; - IF FOUND THEN + IF FOUND AND val IS NOT NULL THEN UPDATE config.metabib_class SET low_result_threshold = val::INT; END IF; @@ -730,7 +730,7 @@ BEGIN JOIN actor.org_unit_type t ON (u.ou_type = t.id) WHERE s.name = 'opac.did_you_mean.max_suggestions'; - IF FOUND THEN + IF FOUND AND val IS NOT NULL THEN UPDATE config.metabib_class SET max_suggestions = val::INT; END IF; @@ -740,7 +740,7 @@ BEGIN JOIN actor.org_unit_type t ON (u.ou_type = t.id) WHERE s.name = 'search.symspell.min_suggestion_use_threshold'; - IF FOUND THEN + IF FOUND AND val IS NOT NULL THEN UPDATE config.metabib_class SET min_suggestion_use_threshold = val::INT; END IF; @@ -750,7 +750,7 @@ BEGIN JOIN actor.org_unit_type t ON (u.ou_type = t.id) WHERE s.name = 'search.symspell.soundex.weight'; - IF FOUND THEN + IF FOUND AND val IS NOT NULL THEN UPDATE config.metabib_class SET soundex_weight = val::INT; END IF; @@ -760,7 +760,7 @@ BEGIN JOIN actor.org_unit_type t ON (u.ou_type = t.id) WHERE s.name = 'search.symspell.pg_trgm.weight'; - IF FOUND THEN + IF FOUND AND val IS NOT NULL THEN UPDATE config.metabib_class SET pg_trgm_weight = val::INT; END IF; @@ -770,7 +770,7 @@ BEGIN JOIN actor.org_unit_type t ON (u.ou_type = t.id) WHERE s.name = 'search.symspell.keyboard_distance.weight'; - IF FOUND THEN + IF FOUND AND val IS NOT NULL THEN UPDATE config.metabib_class SET keyboard_distance_weight = val::INT; END IF; END; -- 2.11.0