From 12995ac65792df2f47335c6a6647b9bde8a41ec9 Mon Sep 17 00:00:00 2001 From: Kyle M Hall 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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Koha/Edifact/File.pm b/Koha/Edifact/File.pm index 8e9cea555cd..6f9036c039b 100644 --- a/Koha/Edifact/File.pm +++ b/Koha/Edifact/File.pm @@ -38,6 +38,7 @@ Returns the I associated with this edifact file sub vendor { my ($self) = @_; my $vendor_rs = $self->_result->vendor; + return unless $vendor_rs; return Koha::Acquisition::Bookseller->_new_from_dbic( $vendor_rs ); } @@ -52,6 +53,7 @@ Returns the I associated with this edifact file. sub basket { my ( $self ) = @_; my $basket_rs = $self->_result->basketno; + return unless $basket_rs; return Koha::Acquisition::Basket->_new_from_dbic( $basket_rs ); } -- 2.30.2