We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 753356a commit 8e794bcCopy full SHA for 8e794bc
gridfs/grid_file.py
@@ -256,7 +256,7 @@ def __flush(self):
256
# connection, can succeed out-of-order due to the writebackListener.
257
# We mustn't call "filemd5" until all inserts are complete, which
258
# we ensure by calling getLastError (and ignoring the result).
259
- db.error()
+ db.command('getlasterror', read_preference=ReadPreference.PRIMARY)
260
261
md5 = db.command(
262
"filemd5", self._id, root=self._coll.name,
0 commit comments