[ARVADOS] updated: b8fdb9089b0ed5213d7b8d8262b65558539fa054

git at public.curoverse.com git at public.curoverse.com
Tue Oct 14 10:40:42 EDT 2014


Summary of changes:
 services/api/lib/eventbus.rb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

       via  b8fdb9089b0ed5213d7b8d8262b65558539fa054 (commit)
      from  c088fcf0b5aaf31195ec1b94873e93f1fd3ee8ed (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit b8fdb9089b0ed5213d7b8d8262b65558539fa054
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Tue Oct 14 10:40:36 2014 -0400

    3692: Bug fix for inadequate grouping when constructing selection.

diff --git a/services/api/lib/eventbus.rb b/services/api/lib/eventbus.rb
index 96e9d04..03afc31 100644
--- a/services/api/lib/eventbus.rb
+++ b/services/api/lib/eventbus.rb
@@ -78,6 +78,8 @@ class EventBus
           ws.filters.each do |filter|
             ft = record_filters filter.filters, Log
             if ft[:cond_out].any?
+              # Join the clauses within a single subscription filter with AND
+              # so it is consistent with regular queries
               cond_out << "(#{ft[:cond_out].join ') AND ('})"
               param_out += ft[:param_out]
             end
@@ -85,7 +87,8 @@ class EventBus
 
           # Add filters to query
           if cond_out.any?
-            logs = logs.where(cond_id + " AND (#{cond_out.join ') OR ('})", *param_out)
+            # Join subscriptions with OR
+            logs = logs.where(cond_id + " AND ((#{cond_out.join ') OR ('}))", *param_out)
           else
             logs = logs.where(cond_id, *param_out)
           end

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list