Bug 27017: (QA follow-up) Don't die if aqorders.biblionumber is null
authorKyle Hall <kyle@bywatersolutions.com>
Thu, 27 Oct 2022 18:03:05 +0000 (14:03 -0400)
committerTomas Cohen Arazi <tomascohen@theke.io>
Thu, 27 Oct 2022 18:03:49 +0000 (15:03 -0300)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha/EDI.pm

index 9fc92a4..954d32e 100644 (file)
@@ -321,8 +321,8 @@ sub process_invoice {
                     $line->quantity );
 
                 my $order = $schema->resultset('Aqorder')->find($ordernumber);
-                if ($order->biblionumber->biblionumber) {
-                    my $b = $order->biblionumber->biblionumber;
+                if (my $bib = $order->biblionumber) {
+                    my $b = $bib->biblionumber;
                     my $id = $line->item_number_id;
                     $logger->trace("Updating bib:$b id:$id");
                 }