Bug 10484: serials-edit.pl not checking for barcode field before checking for barcode subfield
The script serials-edit.pl is not checking for the existence of the barcode field before checking for barcode subfield for autoBarcode = incremental. If the barcode field doesn't exist, the script dies with errors. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Passes tests and QA script. Checked that adding items on serial receive still works. Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This commit is contained in:
parent
ad2c1b3b8f
commit
9af08e4e2d
1 changed files with 6 additions and 2 deletions
|
@ -318,8 +318,12 @@ if ( $op and $op eq 'serialchangestatus' ) {
|
|||
if ( C4::Context->preference('autoBarcode') eq
|
||||
'incremental' )
|
||||
{
|
||||
if ( !$bib_record->field($barcodetagfield)
|
||||
->subfield($barcodetagsubfield) )
|
||||
if (
|
||||
!(
|
||||
$bib_record->field($barcodetagfield)
|
||||
&& $bib_record->field($barcodetagfield)->subfield($barcodetagsubfield)
|
||||
)
|
||||
)
|
||||
{
|
||||
my $sth_barcode = $dbh->prepare(
|
||||
'select max(abs(barcode)) from items');
|
||||
|
|
Loading…
Reference in a new issue