mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-01 04:32:16 +08:00
fix sorting by assigned causes ajax error
This commit is contained in:
parent
69919359f1
commit
ec76873e95
1 changed files with 2 additions and 0 deletions
|
@ -234,6 +234,8 @@ class RepositoryDatatable < AjaxDatatablesRails::Base
|
|||
def sort_records(records)
|
||||
if params[:order].present? && params[:order].length == 1
|
||||
if sort_column(params[:order].values[0]) == ASSIGNED_SORT_COL
|
||||
# If "assigned" column is sorted when viewing assigned items
|
||||
return records if @my_module && params[:assigned] == 'assigned'
|
||||
# If "assigned" column is sorted
|
||||
direction = sort_null_direction(params[:order].values[0])
|
||||
if @my_module
|
||||
|
|
Loading…
Reference in a new issue