} elsif( $$options{with_item_import_error} and $type eq 'bib') {
- $query->{from} = {$class => 'vii'};
+ $query->{from} = {$class => {'vii' => {}}};
$query->{where}->{'+vii'} = {import_error => {'!=' => undef}};
}
}
if($self->api_name =~ /matches/) {
# find only records that have matches
- $query->{from} = {$class => {$mclass => {type => 'right'}}};
+ if (ref $query->{from}) {
+ $query->{from}{$class}{$mclass} = {type => 'right'};
+ } else {
+ $query->{from} = {$class => {$mclass => {type => 'right'}}};
+ }
} else {
# join to mclass for sorting (see below)
- $query->{from} = {$class => {$mclass => {type => 'left'}}};
+ if (ref $query->{from}) {
+ $query->{from}{$class}{$mclass} = {type => 'left'};
+ } else {
+ $query->{from} = {$class => {$mclass => {type => 'left'}}};
+ }
}
# order by the matched bib records to group like queued records