Bugzilla – Attachment 49810 Details for
Bug 16056
Error when deleting MARC authority
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16056: Do not crash when searching for an authority if zebra's index is not up-to-date
Bug-16056-Do-not-crash-when-searching-for-an-autho.patch (text/plain), 1.67 KB, created by
Tomás Cohen Arazi (tcohen)
on 2016-04-01 18:01:52 UTC
(
hide
)
Description:
Bug 16056: Do not crash when searching for an authority if zebra's index is not up-to-date
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2016-04-01 18:01:52 UTC
Size:
1.67 KB
patch
obsolete
>From 9f51b185d051f4d2a0b80bf488a7141ed41d7033 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 21 Mar 2016 15:25:41 +0000 >Subject: [PATCH] Bug 16056: Do not crash when searching for an authority if > zebra's index is not up-to-date > >This patch fixes a regression introduced by >commit 7e70202d34d75f988fbaea9b911347417c203aac > Bug 15381: Remove GetAuthType and GetAuthTypeCode > >This first version will reintroduce the same behavior as before bug >15381: the record will be displayed even if it's no in the DB > >Test plan: >Search for authorities >delete one >The zebra's index is not updated yet and the results will contain the >record you have deleted. > >Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar> >--- > C4/AuthoritiesMarc.pm | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > >diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm >index 39ce815..43e6a53 100644 >--- a/C4/AuthoritiesMarc.pm >+++ b/C4/AuthoritiesMarc.pm >@@ -300,8 +300,11 @@ sub SearchAuthorities { > } > } > >- my $thisauthtypecode = Koha::Authorities->find($authid)->authtypecode; >- my $thisauthtype = Koha::Authority::Types->find($thisauthtypecode); >+ my ( $thisauthtype, $thisauthtypecode ); >+ if ( my $authority = Koha::Authorities->find($authid) ) { >+ $thisauthtypecode = $authority->authtypecode; >+ $thisauthtype = Koha::Authority::Types->find($thisauthtypecode); >+ } > unless (defined $thisauthtype) { > $thisauthtypecode = $authtypecode; > $thisauthtype = Koha::Authority::Types->find($thisauthtypecode); >-- >2.7.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 16056
:
49394
|
49395
|
49437
| 49810