File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -596,7 +596,7 @@ def supports_secondary_read_pref(self):
596
596
if self .has_secondaries :
597
597
return True
598
598
if self .is_mongos :
599
- shard = self .client .config .shards .find_one ()["host" ] # type:ignore[index]
599
+ shard = ( self .client .config .shards .find_one () )["host" ] # type:ignore[index]
600
600
num_members = shard .count ("," ) + 1
601
601
return num_members > 1
602
602
return False
Original file line number Diff line number Diff line change @@ -598,7 +598,7 @@ async def supports_secondary_read_pref(self):
598
598
if await self .has_secondaries :
599
599
return True
600
600
if self .is_mongos :
601
- shard = await self .client .config .shards .find_one ()["host" ] # type:ignore[index]
601
+ shard = ( await self .client .config .shards .find_one () )["host" ] # type:ignore[index]
602
602
num_members = shard .count ("," ) + 1
603
603
return num_members > 1
604
604
return False
You can’t perform that action at this time.
0 commit comments