Arvados-DCO-1.1-Signed-off-by: Radhika Chippada <radhika@curoverse.com>
[arvados.git] / services / api / lib / record_filters.rb
index 350c3802fc60e606fd0dba703429ca7dc98f847e..eb8d09b74c88e118af371f35ab58d15bb1a704b7 100644 (file)
@@ -1,3 +1,7 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
 # Mixin module providing a method to convert filters into a list of SQL
 # fragments suitable to be fed to ActiveRecord #where.
 #
@@ -126,6 +130,8 @@ module RecordFilters
             end
           end
           cond_out << cond.join(' OR ')
+        else
+          raise ArgumentError.new("Invalid operator '#{operator}'")
         end
       end
       conds_out << cond_out.join(' OR ') if cond_out.any?