Bugzilla – Attachment 77887 Details for
Bug 21203
ILS-DI - GetRecords crashes on non-existent records
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21203: ILS-DI - Make GetRecords handle non-existent records
Bug-21203-ILS-DI---Make-GetRecords-handle-non-exis.patch (text/plain), 1.72 KB, created by
Josef Moravec
on 2018-08-16 10:24:11 UTC
(
hide
)
Description:
Bug 21203: ILS-DI - Make GetRecords handle non-existent records
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2018-08-16 10:24:11 UTC
Size:
1.72 KB
patch
obsolete
>From 4262bae1a73d721c3cf0a97a43c6a4022f8d56c6 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 10 Aug 2018 12:17:45 -0300 >Subject: [PATCH] Bug 21203: ILS-DI - Make GetRecords handle non-existent > records > >Caused by > commit cb336e633bf7e0cb25051a8ed8157af8486a58d7 > Bug 18255: Koha::Biblio - Replace GetBiblioItemByBiblioNumber with Koha::Biblio->biblioitem > >Can't call method "biblioitem" on an undefined value at /home/vagrant/kohaclone/C4/ILSDI/Services.pm line 212 > >Test plan: >- Enable ilsdi >- hit /cgi-bin/koha/ilsdi.pl?service=GetRecords&id=X >With X an existing biblionumber and a non existing one > >Both requests must succeed > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >--- > C4/ILSDI/Services.pm | 11 +++++------ > 1 file changed, 5 insertions(+), 6 deletions(-) > >diff --git a/C4/ILSDI/Services.pm b/C4/ILSDI/Services.pm >index 5534d3c..9498a77 100644 >--- a/C4/ILSDI/Services.pm >+++ b/C4/ILSDI/Services.pm >@@ -209,14 +209,13 @@ sub GetRecords { > > # Get the biblioitem from the biblionumber > my $biblio = Koha::Biblios->find( $biblionumber ); >- my $biblioitem = $biblio->biblioitem; >- if ( $biblioitem ) { >- $biblioitem = $biblioitem->unblessed; >- } else { >- $biblioitem->{code} = "RecordNotFound"; >- # FIXME We should not need to process something else; next? >+ unless ( $biblio ) { >+ push @records, { code => "RecordNotFound" }; >+ next; > } > >+ my $biblioitem = $biblio->biblioitem->unblessed; >+ > my $embed_items = 1; > my $record = GetMarcBiblio({ > biblionumber => $biblionumber, >-- >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 21203
:
77688
|
77777
| 77887