Skip to content

Commit

Permalink
Sort null size values accordingly
Browse files Browse the repository at this point in the history
  • Loading branch information
davelopez committed Oct 26, 2023
1 parent 694d667 commit 3950785
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/galaxy/managers/hdas.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
desc,
false,
func,
nulls_first,
nulls_last,
select,
true,
)
Expand Down Expand Up @@ -347,8 +349,8 @@ def __init__(self, hda_manager: HDAManager, dataset_manager: datasets.DatasetMan
self.sort_map = {
StoredItemOrderBy.NAME_ASC: asc(model.HistoryDatasetAssociation.name),
StoredItemOrderBy.NAME_DSC: desc(model.HistoryDatasetAssociation.name),
StoredItemOrderBy.SIZE_ASC: asc(model.Dataset.total_size),
StoredItemOrderBy.SIZE_DSC: desc(model.Dataset.total_size),
StoredItemOrderBy.SIZE_ASC: nulls_first(asc(model.Dataset.total_size)),
StoredItemOrderBy.SIZE_DSC: nulls_last(desc(model.Dataset.total_size)),
StoredItemOrderBy.UPDATE_TIME_ASC: asc(model.HistoryDatasetAssociation.update_time),
StoredItemOrderBy.UPDATE_TIME_DSC: desc(model.HistoryDatasetAssociation.update_time),
}
Expand Down

0 comments on commit 3950785

Please sign in to comment.