提交 b319e69e 编写于 作者: J Jeremy Kemper

PostgreSQL: pg driver expects nil instead of empty string for missing user/pass

上级 d2d739fd
......@@ -23,8 +23,8 @@ def self.postgresql_connection(config) # :nodoc:
config = config.symbolize_keys
host = config[:host]
port = config[:port] || 5432
username = config[:username].to_s
password = config[:password].to_s
username = config[:username].to_s if config[:username]
password = config[:password].to_s if config[:password]
if config.has_key?(:database)
database = config[:database]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册