We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ee955f1 commit fd194f2Copy full SHA for fd194f2
pymongo/topology_description.py
@@ -325,11 +325,7 @@ def apply_selector(
325
return [description] if description else []
326
327
# Primary selection fast path.
328
- if (
329
- custom_selector is None
330
- and self.topology_type == TOPOLOGY_TYPE.ReplicaSetWithPrimary
331
- and type(selector) is Primary
332
- ):
+ if self.topology_type == TOPOLOGY_TYPE.ReplicaSetWithPrimary and type(selector) is Primary:
333
for sd in self._server_descriptions.values():
334
if sd.server_type == SERVER_TYPE.RSPrimary:
335
sds = [sd]
0 commit comments