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 370d748 commit 84d04e3Copy full SHA for 84d04e3
lib/mongo/grid/stream/write.rb
@@ -157,8 +157,8 @@ def files_collection
157
end
158
159
def with_write_concern(collection)
160
- if write_concern.nil? || collection.write_concern.nil? ||
161
- collection.write_concern.options == write_concern.options
+ if write_concern.nil? || (collection.write_concern &&
+ collection.write_concern.options == write_concern.options)
162
collection
163
else
164
collection.client.with(write: write_concern.options)[collection.name]
0 commit comments