X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/9b6b5f0bd2ad96deeea2070a4eba56795bb28c1a..a25971cae157b6bc40037e391db226da36dc9b30:/services/api/lib/record_filters.rb diff --git a/services/api/lib/record_filters.rb b/services/api/lib/record_filters.rb index c009bf537f..350c3802fc 100644 --- a/services/api/lib/record_filters.rb +++ b/services/api/lib/record_filters.rb @@ -77,7 +77,12 @@ module RecordFilters "boolean attribute '#{attr}'") end end - cond_out << "#{ar_table_name}.#{attr} #{operator} ?" + if operator == '<>' + # explicitly allow NULL + cond_out << "#{ar_table_name}.#{attr} #{operator} ? OR #{ar_table_name}.#{attr} IS NULL" + else + cond_out << "#{ar_table_name}.#{attr} #{operator} ?" + end if (# any operator that operates on value rather than # representation: operator.match(/[<=>]/) and (attr_type == :datetime))