mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-22 13:04:30 +08:00
Fix handling of missing sorting parameters on tables [SCI-10491]
This commit is contained in:
parent
307db56712
commit
63a0b2746b
1 changed files with 1 additions and 1 deletions
|
@ -37,7 +37,7 @@ module Lists
|
|||
end
|
||||
|
||||
def sort_records
|
||||
return unless @params[:order]
|
||||
return unless @params[:order] && sortable_columns[order_params[:column].to_sym].present?
|
||||
|
||||
sort_by = "#{sortable_columns[order_params[:column].to_sym]} #{sort_direction(order_params)}"
|
||||
@records = @records.order(sort_by).order(:id)
|
||||
|
|
Loading…
Add table
Reference in a new issue