Merge branch '10790-crunch-job-log-timeout' refs #10790
[arvados.git] / services / api / lib / load_param.rb
index 3bab33f9a9d90e5da56d206841d8c05052909b85..dee0f23b1d87118ac5aaff6652579be87b1d5229 100644 (file)
@@ -153,8 +153,9 @@ module LoadParam
       # Any ordering columns must be selected when doing select,
       # otherwise it is an SQL error, so filter out invaliding orderings.
       @orders.select! { |o|
+        col, dir = o.split
         # match select column against order array entry
-        @select.select { |s| /^#{table_name}.#{s}( (asc|desc))?$/.match o }.any?
+        @select.select { |s| col == "#{table_name}.#{s}" }.any?
       }
     end