From 09e02476773c181fcd4009f59c19c7ac1f46d775 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Wed, 12 Jan 2022 09:43:48 -0300 Subject: [PATCH] Bug 29544: (QA follow-up) Simplify code I think this is a better approach for the same thing. Posting it just in case it helps. Signed-off-by: Tomas Cohen Arazi Signed-off-by: Fridolin Somers --- opac/opac-issue-note.pl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/opac/opac-issue-note.pl b/opac/opac-issue-note.pl index 5cfb7aef15..b59e838b06 100755 --- a/opac/opac-issue-note.pl +++ b/opac/opac-issue-note.pl @@ -48,10 +48,9 @@ $template->param( ); my $issue_id = $query->param('issue_id'); -my $issue = Koha::Checkouts->find( $issue_id ); +my $issue = $patron->checkouts->find( $issue_id ); - -if ( !$issue || $issue->borrowernumber != $borrowernumber ) { +unless ( $issue ) { # exit early print $query->redirect("/cgi-bin/koha/opac-user.pl"); exit; -- 2.39.5