LP#1587639 Avoid double-update fixes user/berick/lp1587639-vand-auth-edit-date-2
authorBill Erickson <berickxx@gmail.com>
Fri, 5 Aug 2016 14:15:27 +0000 (10:15 -0400)
committerBill Erickson <berickxx@gmail.com>
Fri, 5 Aug 2016 14:21:24 +0000 (10:21 -0400)
Minor syntax / thinko repairs.  Remove 'update_fields' var, which is no
longer used.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/sql/Pg/012.schema.vandelay.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.schema.authority-vandeley-edit-date.sql

index ff57e4c..ff474cd 100644 (file)
@@ -1795,7 +1795,6 @@ DECLARE
     v_marc          TEXT;
     replace_rule    TEXT;
     match_count     INT;
-    update_fields   TEXT[];
     update_query    TEXT;
 BEGIN
 
@@ -1809,13 +1808,13 @@ BEGIN
             JOIN vandelay.authority_match m ON (m.queued_record = q.id AND q.id = import_id)
       LIMIT 1;
 
+    eg_marc := eg_marc_row.marc;
+
     IF eg_marc IS NULL OR v_marc IS NULL THEN
         -- RAISE NOTICE 'no marc for vandelay or authority record';
         RETURN FALSE;
     END IF;
 
-    eg_marc := eg_marc_row.marc
-
     -- Extract the editor string before any modification to the vandelay
     -- MARC occur.
     editor_string := 
index 3a2362e..968a520 100644 (file)
@@ -16,7 +16,6 @@ DECLARE
     v_marc          TEXT;
     replace_rule    TEXT;
     match_count     INT;
-    update_fields   TEXT[];
     update_query    TEXT;
 BEGIN
 
@@ -30,13 +29,13 @@ BEGIN
             JOIN vandelay.authority_match m ON (m.queued_record = q.id AND q.id = import_id)
       LIMIT 1;
 
+    eg_marc := eg_marc_row.marc;
+
     IF eg_marc IS NULL OR v_marc IS NULL THEN
         -- RAISE NOTICE 'no marc for vandelay or authority record';
         RETURN FALSE;
     END IF;
 
-    eg_marc := eg_marc_row.marc
-
     -- Extract the editor string before any modification to the vandelay
     -- MARC occur.
     editor_string :=