From 6e0c65b4a69a92447d6e9a754a6f84c043b39143 Mon Sep 17 00:00:00 2001 From: col <80430051+broadstack-au@users.noreply.github.com> Date: Wed, 15 May 2024 18:01:46 +1000 Subject: [PATCH] Ensure resume options aren't combined during automatic retry --- pymongo/change_stream.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pymongo/change_stream.py b/pymongo/change_stream.py index dc2f6bf2c5..300bd88e92 100644 --- a/pymongo/change_stream.py +++ b/pymongo/change_stream.py @@ -179,8 +179,7 @@ def _change_stream_options(self) -> dict[str, Any]: options["startAfter"] = resume_token else: options["resumeAfter"] = resume_token - - if self._start_at_operation_time is not None: + elif self._start_at_operation_time is not None: options["startAtOperationTime"] = self._start_at_operation_time if self._show_expanded_events: