projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into 6087-collection-timing
[arvados.git]
/
services
/
api
/
lib
/
record_filters.rb
diff --git
a/services/api/lib/record_filters.rb
b/services/api/lib/record_filters.rb
index c009bf537f1966fd16326ef3bc239c7d6d623f99..350c3802fc60e606fd0dba703429ca7dc98f847e 100644
(file)
--- 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
"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))
if (# any operator that operates on value rather than
# representation:
operator.match(/[<=>]/) and (attr_type == :datetime))