LP#1845260: fix error in vandelay.auto_overlay_org_unit_copies db function
[working/Evergreen.git] / Open-ILS / src / sql / Pg / 012.schema.vandelay.sql
index 732be40..64fd6cd 100644 (file)
@@ -1885,7 +1885,7 @@ BEGIN
     -- These are our initial scope_orgs.
     SELECT ARRAY_AGG(DISTINCT owning_lib) INTO scope_orgs
         FROM vandelay.import_item
-        WHERE queued_record = import_id;
+        WHERE record = import_id;
 
     WHILE CARDINALITY(scope_orgs) > 0 LOOP
         FOR scope_org IN SELECT * FROM UNNEST(scope_orgs) LOOP