Bug 30979: Fix regression
This patch fixes a regression introduced by the 'Fix public availability 500' follow-up. To test: 1. Run: $ ktd --shell k$ prove t/db_dependent/api/v1/checkouts.t => FAIL: Tests fail! 2. Apply this patch 3. Repeat 1 => SUCCESS: Tests pass! Tests are useful! 4. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
0a0b1eb68b
commit
d0ef15717f
1 changed files with 6 additions and 3 deletions
|
@ -160,9 +160,12 @@ sub get_availability {
|
|||
my ( $impossible, $confirmation, $warnings ) =
|
||||
$c->_check_availability( $patron, $item );
|
||||
|
||||
my $confirm_keys = join( ":", sort keys %{$confirmation} );
|
||||
$confirm_keys = $user ? $user->id : '' . ":" . $item->id . ":" . $confirm_keys;
|
||||
my $token = Koha::Token->new->generate_jwt( { id => $confirm_keys } );
|
||||
my @confirm_keys = sort keys %{$confirmation};
|
||||
unshift @confirm_keys, $item->id;
|
||||
unshift @confirm_keys, $user->id
|
||||
if $user;
|
||||
|
||||
my $token = Koha::Token->new->generate_jwt( { id => join( ':', @confirm_keys ) } );
|
||||
|
||||
my $response = {
|
||||
blockers => $impossible,
|
||||
|
|
Loading…
Reference in a new issue