File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -735,7 +735,8 @@ def _create_or_update_user(
735735 opts ["pwd" ] = auth ._password_digest (name , password )
736736 opts ["digestPassword" ] = False
737737
738- opts ["writeConcern" ] = self ._get_wc_override ()
738+ opts ["writeConcern" ] = (
739+ self ._get_wc_override () or self .write_concern .document )
739740 opts .update (kwargs )
740741
741742 if create :
@@ -841,8 +842,10 @@ def remove_user(self, name):
841842 """
842843
843844 try :
845+ write_concern = (
846+ self ._get_wc_override () or self .write_concern .document )
844847 self .command ("dropUser" , name ,
845- writeConcern = self . _get_wc_override () )
848+ writeConcern = write_concern )
846849 except OperationFailure as exc :
847850 # See comment in add_user try / except above.
848851 if exc .code in common .COMMAND_NOT_FOUND_CODES :
You can’t perform that action at this time.
0 commit comments