File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -256,14 +256,18 @@ def _finish_transaction(self, command_name):
256256 self ._server_session ._transaction_id += 1
257257 return
258258
259+ write_concern = self ._current_transaction_opts .write_concern
260+ if write_concern is None :
261+ write_concern = self .client .write_concern
262+
259263 # TODO: retryable. And it's weird to pass parse_write_concern_error
260264 # from outside database.py.
261265 self ._client .admin .command (
262266 command_name ,
263267 txnNumber = self ._server_session .transaction_id ,
264268 stmtId = self ._server_session .statement_id ,
265269 session = self ,
266- write_concern = self . _current_transaction_opts . write_concern ,
270+ write_concern = write_concern ,
267271 read_preference = self ._current_txn_read_pref ,
268272 parse_write_concern_error = True )
269273 finally :
You can’t perform that action at this time.
0 commit comments