Skip to content

Commit 47cff11

Browse files
committed
Merge pull request #115 from FlorianPerucki/master
Fixed error when accessing 'spec' attribute on _GetMore queries
2 parents cf0986e + 61953f1 commit 47cff11

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

mrq/monkey.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ def _Cursor__send_message(self, *args, **kwargs):
410410
config.get("mongodb_pre_hook")({
411411
"collection": full_name,
412412
"method": subtype,
413-
"args": (args[0].spec, ),
413+
"args": (getattr(args[0], "spec", None), ),
414414
"kwargs": kwargs,
415415
"client": self._Cursor__collection.database.client,
416416
"job": job
@@ -429,7 +429,7 @@ def _Cursor__send_message(self, *args, **kwargs):
429429
config.get("mongodb_post_hook")({
430430
"collection": full_name,
431431
"method": subtype,
432-
"args": (args[0].spec, ),
432+
"args": (getattr(args[0], "spec", None), ),
433433
"kwargs": kwargs,
434434
"client": self._Cursor__collection.database.client,
435435
"job": job,

0 commit comments

Comments
 (0)