Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
linter
  • Loading branch information
Jesse De Loore committed Dec 16, 2022
commit ae325ba83c075ef11dfaa3cef86f427ab0ab17dc
4 changes: 2 additions & 2 deletions asyncpg/connect_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -917,9 +917,9 @@ def _accept_read_only(should_be_read_only: bool):
"""
async def can_be_used(connection):
settings = connection.get_settings()
is_read_only = getattr(settings, 'default_transaction_read_only', 'off')
is_readonly = getattr(settings, 'default_transaction_read_only', 'off')

if should_be_read_only and is_read_only == "on":
if should_be_read_only and is_readonly == "on":
return True
return await _accept_in_hot_standby(should_be_read_only)(connection)
return can_be_used
Expand Down