Bugzilla – Attachment 138057 Details for
Bug 29697
Replace GetMarcBiblio occurrences with $biblio->metadata->record
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29697: (follow-up) Indexing a deleted record is not expected to crash
Bug-29697-follow-up-Indexing-a-deleted-record-is-n.patch (text/plain), 1.32 KB, created by
Tomás Cohen Arazi (tcohen)
on 2022-07-22 18:55:03 UTC
(
hide
)
Description:
Bug 29697: (follow-up) Indexing a deleted record is not expected to crash
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2022-07-22 18:55:03 UTC
Size:
1.32 KB
patch
obsolete
>From 8a1d66740873009f0cc8d5b28598e9fd45df20bd Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Fri, 22 Jul 2022 15:49:22 -0300 >Subject: [PATCH] Bug 29697: (follow-up) Indexing a deleted record is not > expected to crash > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/SearchEngine/Elasticsearch/Indexer.pm | 15 ++++++++++++--- > 1 file changed, 12 insertions(+), 3 deletions(-) > >diff --git a/Koha/SearchEngine/Elasticsearch/Indexer.pm b/Koha/SearchEngine/Elasticsearch/Indexer.pm >index 9407a29882d..6101a3a3729 100644 >--- a/Koha/SearchEngine/Elasticsearch/Indexer.pm >+++ b/Koha/SearchEngine/Elasticsearch/Indexer.pm >@@ -336,9 +336,18 @@ sub index_records { > > sub _get_record { > my ( $self, $record_id ) = @_; >- return $self->index eq $Koha::SearchEngine::BIBLIOS_INDEX >- ? Koha::Biblios->find($record_id)->metadata->record({ embed_items => 1 }) >- : C4::AuthoritiesMarc::GetAuthority($record_id); >+ >+ my $record; >+ >+ if ( $self->index eq $Koha::SearchEngine::BIBLIOS_INDEX ) { >+ my $biblio = Koha::Biblios->find($record_id); >+ $record = $biblio->metadata->record( { embed_items => 1 } ) >+ if $biblio; >+ } else { >+ $record = C4::AuthoritiesMarc::GetAuthority($record_id); >+ } >+ >+ return $record; > } > > =head2 delete_index($biblionums) >-- >2.34.1
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 29697
:
129757
|
129758
|
129759
|
129760
|
129761
|
131868
|
131869
|
131870
|
131871
|
131872
|
131873
|
134066
|
134067
|
134068
|
134069
|
134070
|
134071
|
135574
|
135575
|
135576
|
135577
|
135578
|
135579
|
135580
|
135662
|
135663
|
135664
|
135665
|
135666
|
135667
|
135668
|
135669
|
135670
|
135671
|
135672
|
135673
|
135797
|
135798
|
135799
|
135800
|
135801
|
135802
|
135978
|
135979
|
135980
|
135981
|
135982
|
137835
|
137836
|
137837
|
137838
|
137839
|
137840
|
137894
|
137918
|
137919
|
137920
|
137921
|
137922
|
137923
|
137924
|
137948
| 138057 |
138076
|
138077
|
138078
|
138079
|
138080
|
138081
|
138089
|
138090
|
138804
|
139127
|
140007
|
140008