From eaa3e0d3c087fd9295ea3bfdbfa3483a4948ed77 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Thu, 29 Feb 2024 13:43:47 +0000 Subject: [PATCH] Bug 34920: Return sorted av_cats to be able to test --- Koha/REST/V1/AuthorisedValueCategories.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Koha/REST/V1/AuthorisedValueCategories.pm b/Koha/REST/V1/AuthorisedValueCategories.pm index 3a7872f6de8..f3245115c1e 100644 --- a/Koha/REST/V1/AuthorisedValueCategories.pm +++ b/Koha/REST/V1/AuthorisedValueCategories.pm @@ -36,8 +36,9 @@ sub list { my $c = shift->openapi->valid_input or return; return try { - my $authorised_value_categories_set = Koha::AuthorisedValueCategories->new; - my $authorised_value_categories = $c->objects->search( $authorised_value_categories_set ); + my $authorised_value_categories_set = + Koha::AuthorisedValueCategories->search( {}, { order_by => 'category_name' } ); + my $authorised_value_categories = $c->objects->search($authorised_value_categories_set); return $c->render( status => 200, openapi => $authorised_value_categories ); } catch { -- 2.30.2