8784: Fix test for latest firefox.
[arvados.git] / services / api / app / controllers / arvados / v1 / logs_controller.rb
1 class Arvados::V1::LogsController < ApplicationController
2   # Overrides ApplicationController load_where_param
3   def load_where_param
4     super
5
6     # object_kind and column is now virtual,
7     # equivilent functionality is now provided by
8     # 'is_a', so fix up any old-style 'where' clauses.
9     if @where
10       @filters ||= []
11       if @where[:object_kind]
12         @filters << ['object_uuid', 'is_a', @where[:object_kind]]
13         @where.delete :object_kind
14       end
15     end
16   end
17
18   # Overrides ApplicationController load_filters_param
19   def load_filters_param
20     super
21
22     # object_kind and column is now virtual,
23     # equivilent functionality is now provided by
24     # 'is_a', so fix up any old-style 'filter' clauses.
25     @filters = @filters.map do |k|
26       if k[0] == 'object_kind' and k[1] == '='
27         ['object_uuid', 'is_a', k[2]]
28       else
29         k
30       end
31     end
32   end
33
34 end