Bugzilla – Attachment 69242 Details for
Bug 19596
Internal server error if open order with deleted biblio / null biblionumber
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19596 - Don't try to get hold or items count for non-existent biblios
Bug-19596---Dont-try-to-get-hold-or-items-count-fo.patch (text/plain), 1.38 KB, created by
Dilan Johnpullé
on 2017-11-21 05:07:52 UTC
(
hide
)
Description:
Bug 19596 - Don't try to get hold or items count for non-existent biblios
Filename:
MIME Type:
Creator:
Dilan Johnpullé
Created:
2017-11-21 05:07:52 UTC
Size:
1.38 KB
patch
obsolete
>From 202ea3623aa51e232229bdf0f2bdeb32f27827f6 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 8 Nov 2017 17:55:00 +0000 >Subject: [PATCH] Bug 19596 - Don't try to get hold or items count for > non-existent biblios >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Patch applies and works as expected. > >Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au> >--- > acqui/parcel.pl | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/acqui/parcel.pl b/acqui/parcel.pl >index c1e0c56..b01e591 100755 >--- a/acqui/parcel.pl >+++ b/acqui/parcel.pl >@@ -242,9 +242,9 @@ unless( defined $invoice->{closedate} ) { > my $biblio = Koha::Biblios->find( $biblionumber ); > my $countbiblio = CountBiblioInOrders($biblionumber); > my $ordernumber = $line{'ordernumber'}; >- my $cnt_subscriptions = $biblio->subscriptions->count; >- my $itemcount = $biblio->items->count; >- my $holds_count = $biblio->holds->count; >+ my $cnt_subscriptions = $biblio ? $biblio->subscriptions->count: 0; >+ my $itemcount = $biblio ? $biblio->items->count : 0; >+ my $holds_count = $biblio ? $biblio->holds->count : 0; > my @items = GetItemnumbersFromOrder( $ordernumber ); > my $itemholds = $biblio ? $biblio->holds->search({ itemnumber => { -in => \@items } })->count : 0; > >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 19596
:
69043
|
69047
|
69242
|
69328