@@ -, +, @@ --- Koha/Hold.pm | 6 +++--- Koha/REST/V1/Holds.pm | 2 +- t/db_dependent/Koha/Hold.t | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) --- a/Koha/Hold.pm +++ a/Koha/Hold.pm @@ -257,7 +257,7 @@ sub is_pickup_location_valid { $hold->set_pickup_location( { library_id => $library->id, - [ override => 0|1 ] + [ force => 0|1 ] } ); @@ -265,7 +265,7 @@ Updates the hold pickup location. It throws a I is set when setting the -B parameter. +B parameter. =cut @@ -276,7 +276,7 @@ sub set_pickup_location { unless $params->{library_id}; if ( - $params->{override} + $params->{force} || $self->is_pickup_location_valid( { library_id => $params->{library_id} } ) --- a/Koha/REST/V1/Holds.pm +++ a/Koha/REST/V1/Holds.pm @@ -539,7 +539,7 @@ sub update_pickup_location { $hold->set_pickup_location( { library_id => $pickup_library_id, - override => $can_override + force => $can_override } ); --- a/t/db_dependent/Koha/Hold.t +++ a/t/db_dependent/Koha/Hold.t @@ -125,9 +125,9 @@ subtest 'set_pickup_location() tests' => sub { $item_hold->discard_changes; is( $item_hold->branchcode, $library_3->branchcode, 'branchcode remains untouched' ); - $item_hold->set_pickup_location({ library_id => $library_1->branchcode, override => 1 }); + $item_hold->set_pickup_location({ library_id => $library_1->branchcode, force => 1 }); $item_hold->discard_changes; - is( $item_hold->branchcode, $library_1->branchcode, 'branchcode changed because of \'override\'' ); + is( $item_hold->branchcode, $library_1->branchcode, 'branchcode changed because of \'force\'' ); $ret = $item_hold->set_pickup_location({ library_id => $library_2->id }); is( ref($ret), 'Koha::Hold', 'self is returned' ); --