Keepproxy use client-supplied token when forwarding GET and PUT requests.
[arvados.git] / services / api / lib / record_filters.rb
index d3727d30f3d661f208f089bc52f21ce7219421b6..01d0ae4da5907dbafdfa7060cea6feb1de7dea88 100644 (file)
@@ -54,6 +54,10 @@ module RecordFilters
         if operand.is_a? Array
           cond_out << "#{ar_table_name}.#{attr} #{operator} (?)"
           param_out << operand
+          if operator == 'not in' and not operand.include?(nil)
+            # explicitly allow NULL
+            cond_out[-1] = "(#{cond_out[-1]} OR #{ar_table_name}.#{attr} IS NULL)"
+          end
         else
           raise ArgumentError.new("Invalid operand type '#{operand.class}' "\
                                   "for '#{operator}' operator in filters")