Bugzilla – Attachment 69043 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.25 KB, created by
Nick Clemens (kidclamp)
on 2017-11-08 17:56:58 UTC
(
hide
)
Description:
Bug 19596 - Don't try to get hold or items count for non-existent biblios
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2017-11-08 17:56:58 UTC
Size:
1.25 KB
patch
obsolete
>From 307522cfc32262095a8bd6d4a0c005e6a0544b66 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 > >To test: >1 - Create some orders >2 - Delete the bibs (or NULL biblionumber from DB) >3 - Try to recieve some orders >4 - Internal server error >5 - Apply patch >6 - Things should work >--- > acqui/parcel.pl | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/acqui/parcel.pl b/acqui/parcel.pl >index c1e0c56..de6fdc3 100755 >--- a/acqui/parcel.pl >+++ b/acqui/parcel.pl >@@ -243,8 +243,8 @@ unless( defined $invoice->{closedate} ) { > 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 $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