mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-27 10:14:17 +08:00
Fix sorting buttons not applying params
This commit is contained in:
parent
1a9fca87d2
commit
c10428cd2a
1 changed files with 3 additions and 1 deletions
|
@ -48,7 +48,9 @@ module ProtocolImporters
|
|||
query = CONSTANTS.dig(:endpoints, :protocols, :default_query_params)
|
||||
.merge(query_params.except(:sort_by))
|
||||
|
||||
query = query.merge(sort_mappings[query_params[:sort_by].to_sym]) if sort_mappings[query_params[:sort_by]]
|
||||
if sort_mappings[query_params[:sort_by]&.to_sym]
|
||||
query = query.merge(sort_mappings[query_params[:sort_by].to_sym])
|
||||
end
|
||||
|
||||
self.class.get('/protocols', query: query)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue