We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef879a5 commit ae1a95aCopy full SHA for ae1a95a
lib/mongo/operation/aggregate.rb
@@ -62,7 +62,7 @@ class Aggregate
62
#
63
# @since 2.0.0
64
def execute(context)
65
- unless context.standalone? || context.primary? || secondary_ok?
+ unless context.standalone? || context.mongos? || context.primary? || secondary_ok?
66
raise Error::NeedPrimaryServer.new(ERROR_MESSAGE)
67
end
68
execute_message(context)
0 commit comments