From 084c938f03d5936fceefbf3e515a0ff1fb02b844 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 28 Jan 2019 12:45:03 -0300 Subject: [PATCH] Bug 22061: (follow-up) set_password expects a hashref Signed-off-by: Tomas Cohen Arazi --- Koha/REST/V1/Patrons/Password.pm | 2 +- t/db_dependent/api/v1/patrons_password.t | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Koha/REST/V1/Patrons/Password.pm b/Koha/REST/V1/Patrons/Password.pm index 08103bedbf..e9d42d7fcb 100644 --- a/Koha/REST/V1/Patrons/Password.pm +++ b/Koha/REST/V1/Patrons/Password.pm @@ -121,7 +121,7 @@ sub set_public { } ## Change password - $user->set_password($password); + $user->set_password({ password => $password }); return $c->render( status => 200, openapi => "" ); } diff --git a/t/db_dependent/api/v1/patrons_password.t b/t/db_dependent/api/v1/patrons_password.t index 2585018229..b704761c08 100644 --- a/t/db_dependent/api/v1/patrons_password.t +++ b/t/db_dependent/api/v1/patrons_password.t @@ -160,7 +160,7 @@ subtest 'set_public() (unprivileged user tests)' => sub { t::lib::Mocks::mock_preference( 'OpacPasswordChange', 1 ); my $password = 'holapassword'; - $patron->set_password( $password ); + $patron->set_password({ password => $password }); $tx = $t->ua->build_tx( POST => "/api/v1/public/patrons/" . $other_patron->id -- 2.20.1