From 4cd81ed3ec9dd16c63048b1a02b656a679e6f1cb 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 Signed-off-by: Laura Escamilla Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer --- 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 3a7872f6de..f3245115c1 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.39.5