LP1808006 - Sitemap generator fix to allow shortname parameter.
[evergreen-equinox.git] / Open-ILS / src / support-scripts / sitemap_generator
index 1a238f5..22bdd8f 100755 (executable)
@@ -163,7 +163,10 @@ sub get_record_ids {
                  )
     ";
     if ($aou_id) {
-        $q .= " WHERE circ_lib IN (SELECT id FROM copy_orgs)";
+        $q .= "
+       INNER JOIN asset.copy ac ON (vc.target_copy = ac.id)
+       WHERE ac.circ_lib IN (SELECT id FROM copy_orgs)
+    ";
     }
     $q .= "
             UNION