fix error

This commit is contained in:
邱博亞 2021-11-20 23:06:16 +08:00
parent 70f7e48749
commit e71936ab4d
1 changed files with 6 additions and 6 deletions

View File

@ -245,25 +245,25 @@ if bundle_update_flag
r.each do |mode,v1|
v1.each do |clients,d|
d.each do |k,v|
if v["username"].present?
if !v["options"].present?
if !v["username"].nil?
if v["options"].nil?
v["options"] = {}
end
v["options"]["user"] = v["username"]
v.delete "username"
end
if v["password"].present?
if !v["options"].present?
if !v["password"].nil?
if !v["options"].nil?
v["options"] = {}
end
v["options"]["password"] = v["password"]
v.delete "password"
end
if v["options"].present? && v["options"]["pool_size"].present?
if !v["options"].nil? && !v["options"]["pool_size"].nil?
v["options"]["max_pool_size"] = v["options"]["pool_size"]
v["options"].delete "pool_size"
end
if v["options"].present? && v["options"]["read"].class == String
if !v["options"].nil? && v["options"]["read"].class == String
v["options"]["read"] = {mode: v["options"]["read"]}
end
end