Skip to content

Commit bb12099

Browse files
authored
fix: flatten out connect_kwargs (#23)
1 parent 4d7587f commit bb12099

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

litestar_asyncpg/config.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,12 @@ def pool_config_dict(self) -> dict[str, Any]:
139139
function.
140140
"""
141141
if self.pool_config:
142-
return simple_asdict(self.pool_config, exclude_empty=True, convert_nested=False)
142+
ret = simple_asdict(self.pool_config, exclude_empty=True, convert_nested=False)
143+
connect_kwargs = ret.pop("connect_kwargs", None)
144+
if connect_kwargs is not None:
145+
ret.update(connect_kwargs)
146+
return ret
147+
143148
msg = "'pool_config' methods can not be used when a 'pool_instance' is provided."
144149
raise ImproperlyConfiguredException(msg)
145150

0 commit comments

Comments
 (0)