diff --git a/Koha/REST/V1/ERM/Licenses.pm b/Koha/REST/V1/ERM/Licenses.pm index 9408dfecae..616c10331c 100644 --- a/Koha/REST/V1/ERM/Licenses.pm +++ b/Koha/REST/V1/ERM/Licenses.pm @@ -55,7 +55,7 @@ sub get { my $c = shift->openapi->valid_input or return; return try { - my $license = $c->objects->find( Koha::ERM::Licenses->new, $c->param('license_id') ); + my $license = $c->objects->find( Koha::ERM::Licenses->search, $c->param('license_id') ); unless ($license) { return $c->render(