19297: Raises an error only when no object types have the requested attribute.
[arvados.git] / services / api / lib / record_filters.rb
index 2f5b67074a9bdf5b24d3689333d17ee6e98e0745..65c25810acf2e3ef98422a1de3a5c8503e75edfe 100644 (file)
@@ -136,7 +136,7 @@ module RecordFilters
             raise ArgumentError.new("Invalid operator for subproperty search '#{operator}'")
           end
         elsif operator == "exists"
-          if col.type != :jsonb
+          if col.nil? or col.type != :jsonb
             raise ArgumentError.new("Invalid attribute '#{attr}' for operator '#{operator}' in filter")
           end