From: phasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Date: Mon, 28 Sep 2009 20:45:54 +0000 (+0000)
Subject: logic error; only want to change the sequence if we are insert this billing type
X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=669516d1857a076657e62aa38d3e70d2cb30cfd2;p=evergreen%2Fmasslnc.git

logic error; only want to change the sequence if we are insert this billing type

git-svn-id: svn://svn.open-ils.org/ILS/trunk@14183 dcc99617-32d9-48b4-a31d-7c20da2025e4
---

diff --git a/Open-ILS/src/sql/Pg/upgrade/0024.data.default_billing_type.sql b/Open-ILS/src/sql/Pg/upgrade/0024.data.default_billing_type.sql
index 317ab44d6d..ef886fa77c 100644
--- a/Open-ILS/src/sql/Pg/upgrade/0024.data.default_billing_type.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/0024.data.default_billing_type.sql
@@ -4,6 +4,6 @@ INSERT INTO config.upgrade_log (version) VALUES ('0024');
 
 -- This only gets inserted if there are no other id > 100 billing types
 INSERT INTO config.billing_type (id, name, owner) SELECT DISTINCT 101, oils_i18n_gettext(101, 'Misc', 'cbt', 'name'), 1 FROM config.billing_type_id_seq WHERE last_value < 101;
-SELECT SETVAL('config.billing_type_id_seq'::TEXT, 101);
+SELECT SETVAL('config.billing_type_id_seq'::TEXT, 101) FROM config.billing_type_id_seq WHERE last_value < 101;
 
 COMMIT;