Skip to content

Commit 94305f0

Browse files
committed
Ensure that collection write concern is default for BulkWrite operations
1 parent f9279b3 commit 94305f0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/mongo/bulk_write/bulk_writable.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,9 @@ def valid_doc?(doc)
132132
end
133133

134134
def write_concern
135-
@write_concern ||= WriteConcern.get(@options[:write_concern]) ||
136-
@collection.write_concern
135+
@write_concern ||= @options[:write_concern] ?
136+
WriteConcern.get(@options[:write_concern]) :
137+
@collection.write_concern
137138
end
138139

139140
def validate_operations!

0 commit comments

Comments
 (0)