Bug 34920: Return sorted av_cats to be able to test

Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Pedro Amorim 2024-02-29 13:43:47 +00:00 committed by Katrin Fischer
parent 0cb91c3a77
commit 4cd81ed3ec
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 3 additions and 2 deletions

View File

@ -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 {