From e9e3bb6aa19ad915904e31d51af875b1bf27aa85 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Fri, 20 Mar 2020 15:53:35 -0300 Subject: [PATCH] Bug 24464: (QA follow-up) Make the method reflect the lack of FK This patch makes it super obvious to understand by reading the code that there's originally no foreign key. To test: 1. Run the tests and notice they pass 2. Spot the # FIXME 3. Sign off :-D Signed-off-by: Tomas Cohen Arazi Signed-off-by: Jonathan Druart Signed-off-by: Martin Renvoize --- Koha/Acquisition/Basket.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Koha/Acquisition/Basket.pm b/Koha/Acquisition/Basket.pm index 4d9a87c3cd..65d9e16d5e 100644 --- a/Koha/Acquisition/Basket.pm +++ b/Koha/Acquisition/Basket.pm @@ -57,8 +57,9 @@ Returns the I for the basket creator. sub creator { my ($self) = @_; - return Koha::Patrons->find( $self->authorisedby ) - if $self->authorisedby; + my $borrowernumber = $self->authorisedby; # FIXME missing FK here + return unless $borrowernumber; + return Koha::Patrons->find( $borrowernumber ); } =head3 basket_group -- 2.39.5