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: Victor Grousset/tuxayo <victor@tuxayo.net> (cherry picked from commit 191cf52da7e2829cba1206612f2dcfc21366a986) Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
This commit is contained in:
parent
f7c493cfc4
commit
5f71e5ff60
|
|
@ -50,10 +50,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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue