} elsif( $vol->isnew ) {
$logger->info("vol-update: creating volume");
- $evt = $assetcom->create_volume( $oargs, $editor, $vol );
+ ($vol,$evt) = $assetcom->create_volume( $auto_merge_vols ? { all => 1} : $oargs, $editor, $vol );
return $evt if $evt;
} elsif( $vol->ischanged ) {
if($label) {
# now restore the label and merge into the existing record
$vol->label($label);
- (undef, $evt) =
- OpenILS::Application::Cat::Merge::merge_volumes($editor, [$vol], $$vols[0]);
- return $evt if $evt;
+ return OpenILS::Application::Cat::Merge::merge_volumes($editor, [$vol], $$vols[0]);
}
- return undef;
+ return ($vol);
}
# returns the volume if it exists
$vol->suffix($suffix);
$vol->record($record_id);
- my $evt = $class->create_volume(0, $e, $vol);
- return (undef, $evt) if $evt;
-
- return ($vol);
+ return $class->create_volume(0, $e, $vol);
}