Bug 38102: Fix default sort order

DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception:
DBD::mysql::st execute failed: Unknown column 'date_due desc' in 'order
clause' at /kohadevbox/koha/Koha/Objects.pm line 401

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2025-07-10 09:53:22 +02:00 committed by Lucas Gass
parent dd28d473cd
commit bb71c19635
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
1 changed files with 1 additions and 1 deletions

View File

@ -57,7 +57,7 @@ if ( $order eq 'title' ) {
} elsif ( $order eq 'author' ) {
$template->param( orderbyauthor => 1 );
} else {
$order = "date_due desc";
$order = { -desc => "date_due" };
$template->param( orderbydate => 1 );
}