Fixed create order sorting

The create order was sorting strings, not numbers.
This commit is contained in:
Kenneth Skovhede
2025-07-07 16:16:39 +02:00
parent 6825c7cdae
commit de1bbcf668
@@ -202,7 +202,13 @@ public class BackupListService(Connection connection) : IBackupListService
Func<Dto.BackupAndScheduleOutputDto, object?>? selector = sort switch
{
"name" => x => x.Backup.Name,
"id" => x => x.Backup.ID,
"id" => x =>
{
if (long.TryParse(x.Backup.ID, out var id))
return id;
return -1;
}
,
"lastrun" => x =>
{
if (x.Backup.Metadata == null)