added sanity checking on mods creation
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 13 Jul 2006 22:05:36 +0000 (22:05 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 13 Jul 2006 22:05:36 +0000 (22:05 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@4997 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm

index 8b0fde7..3b79517 100644 (file)
@@ -589,7 +589,7 @@ sub biblio_mrid_make_modsbatch {
 
        # grab all of the sub-records and shove them into the batch
        my @ids = grep { $_ ne $masterid } @$ids;
-       my $subrecs = $e->batch_retrieve_biblio_record_entry(\@ids);
+       my $subrecs = (@ids) ? $e->batch_retrieve_biblio_record_entry(\@ids) : [];
 
        for(@$subrecs) {
                $logger->debug("adding record ".$_->id." to mods batch for metarecord=$mrid");