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):
596596 if self .has_secondaries :
597597 return True
598598 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]
600600 num_members = shard .count ("," ) + 1
601601 return num_members > 1
602602 return False
Original file line number Diff line number Diff line change @@ -598,7 +598,7 @@ async def supports_secondary_read_pref(self):
598598 if await self .has_secondaries :
599599 return True
600600 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]
602602 num_members = shard .count ("," ) + 1
603603 return num_members > 1
604604 return False
You can’t perform that action at this time.
0 commit comments