X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/1128f6e0d62f71f4ee91ab609c918ae5bb291edd..97403e08475b328115373a2c6a23e82116199aad:/services/api/lib/record_filters.rb?ds=sidebyside 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))