Bugzilla – Attachment 158914 Details for
Bug 30070
Performance issues with edifactmsgs when you have a large number of messages
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30070: (follow-up) Return unless the related object exists
Bug-30070-follow-up-Return-unless-the-related-obje.patch (text/plain), 1.45 KB, created by
Martin Renvoize (ashimema)
on 2023-11-14 10:34:39 UTC
(
hide
)
Description:
Bug 30070: (follow-up) Return unless the related object exists
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2023-11-14 10:34:39 UTC
Size:
1.45 KB
patch
obsolete
>From d18f44630024b0a151f4a6db6953e576fb6c8f36 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 13 Nov 2023 15:59:19 +0000 >Subject: [PATCH] Bug 30070: (follow-up) Return unless the related object > exists > >--- > Koha/Edifact/File.pm | 12 +++++++----- > 1 file changed, 7 insertions(+), 5 deletions(-) > >diff --git a/Koha/Edifact/File.pm b/Koha/Edifact/File.pm >index 8e9cea555cd..2fd475221c9 100644 >--- a/Koha/Edifact/File.pm >+++ b/Koha/Edifact/File.pm >@@ -38,7 +38,8 @@ Returns the I<Koha::Acquisition::Bookseller> associated with this edifact file > sub vendor { > my ($self) = @_; > my $vendor_rs = $self->_result->vendor; >- return Koha::Acquisition::Bookseller->_new_from_dbic( $vendor_rs ); >+ return unless $vendor_rs; >+ return Koha::Acquisition::Bookseller->_new_from_dbic($vendor_rs); > } > > =head3 basket >@@ -50,9 +51,10 @@ Returns the I<Koha::Acquisition::Basket> associated with this edifact file. > =cut > > sub basket { >- my ( $self ) = @_; >+ my ($self) = @_; > my $basket_rs = $self->_result->basketno; >- return Koha::Acquisition::Basket->_new_from_dbic( $basket_rs ); >+ return unless $basket_rs; >+ return Koha::Acquisition::Basket->_new_from_dbic($basket_rs); > } > > =head3 to_api_mapping >@@ -64,8 +66,8 @@ on the API. > > sub to_api_mapping { > return { >- message_type => 'type', >- basketno => 'basket_id', >+ message_type => 'type', >+ basketno => 'basket_id', > }; > } > >-- >2.41.0
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 30070
:
158808
|
158809
|
158810
|
158887
|
158903
|
158904
|
158905
|
158906
|
158907
|
158908
|
158909
|
158910
|
158911
|
158912
|
158913
|
158914
|
158915
|
158918
|
158920
|
158922
|
158923
|
158924
|
158925
|
158926
|
158927
|
158928
|
158929
|
158930
|
158931
|
158932
|
158933
|
158934
|
158935
|
158936
|
158937
|
158938
|
158939
|
158940
|
158941
|
158942
|
158943
|
158944
|
158945
|
158946
|
158947
|
158948
|
158949
|
158950
|
158951
|
158952
|
158953
|
158954
|
158955
|
158963
|
158964
|
158965
|
158966
|
158967
|
158968
|
158969
|
158970
|
158971
|
158972
|
158973
|
158974
|
158975
|
159026
|
159027
|
159028
|
159029
|
159030
|
159031
|
159032
|
159033
|
159034
|
159035
|
159036
|
160336
|
160337
|
160338
|
160339
|
160340
|
160341
|
160342
|
160343
|
160344
|
160345
|
160346
|
160347
|
160348