Merge branch 'use_mktemp' of https://github.com/golharam/arvados into golharam-use_mktemp
[arvados.git] / services / api / lib / record_filters.rb
index e059a6e70aaaba664af9ca5fd428d765ff4201ee..5688ca6140f17fcef94ed112481cddb06e75c668 100644 (file)
@@ -141,7 +141,8 @@ module RecordFilters
             end
             param_out << proppath
           when 'contains'
-            cond_out << "#{attr_table_name}.#{attr} @> ?::jsonb"
+            cond_out << "#{attr_table_name}.#{attr} @> ?::jsonb OR #{attr_table_name}.#{attr} @> ?::jsonb"
+            param_out << SafeJSON.dump({proppath => operand})
             param_out << SafeJSON.dump({proppath => [operand]})
           else
             raise ArgumentError.new("Invalid operator for subproperty search '#{operator}'")