We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7e9f6ca commit b41e896Copy full SHA for b41e896
backend/app/main.py
@@ -49,8 +49,9 @@ def test_db():
49
from urllib.parse import urlparse
50
51
parsed = urlparse(DATABASE_URL)
52
+ port = parsed.port or 5432
53
- conn_str = f"host={parsed.hostname} port={parsed.port} dbname={parsed.path[1:]} user={parsed.username} password={parsed.password}"
54
+ conn_str = f"host={parsed.hostname} port={port} dbname={parsed.path[1:]} user={parsed.username} password={parsed.password}"
55
56
for mode in ["disable", "allow", "prefer", "require"]:
57
try:
0 commit comments