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 <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Tomas Cohen Arazi 2022-01-12 09:43:48 -03:00 committed by Fridolin Somers
parent c967a4e9c2
commit 09e0247677
1 changed files with 2 additions and 3 deletions

View File

@ -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;